Skip to content

Commit

Permalink
HsLet compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
jetjinser committed Sep 2, 2024
1 parent 0e69f46 commit 2f27e9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ghcide/src/Development/IDE/Plugin/TypeLenses.hs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,11 @@ findLocalQ = everything (<>) ([] `mkQ` (pure . findWhere) `extQ` findLet)
findLet = findLetExpr . unLoc

findLetExpr :: HsExpr GhcTc -> [HsLocalBinds GhcTc]
#if !MIN_VERSION_ghc(9,9,0)
findLetExpr (HsLet _ _ binds _ _) = [binds]
#else
findLetExpr (HsLet _ binds _) = [binds]
#endif
findLetExpr (HsDo _ _ (unLoc -> stmts)) = concatMap (findLetStmt . unLoc) stmts
findLetExpr _ = []

Expand Down

0 comments on commit 2f27e9a

Please sign in to comment.