File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
ghcide/src/Development/IDE/Spans Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,9 @@ pointCommand :: HieASTs t -- ^ Get AST
399
399
-> (HieAST t -> a ) -- ^ extact data with a getter
400
400
-> [a ] -- ^ all data recieved
401
401
pointCommand hf pos getter =
402
- catMaybes $ M. elems $ flip M. mapWithKey (getAsts hf) $ \ fs ast ->
402
+ catMaybes $ M. elems $ M. mapWithKey findInfo (getAsts hf)
403
+ where
404
+ findInfo fs ast =
403
405
-- Since GHC 9.2:
404
406
-- getAsts :: Map HiePath (HieAst a)
405
407
-- type HiePath = LexialFastString
@@ -412,7 +414,6 @@ pointCommand hf pos getter =
412
414
-- backwards compatibility.
413
415
let smallestRange = selectSmallestContaining (sp $ coerce fs) ast in
414
416
fmap getter smallestRange
415
- where
416
417
sloc fs = mkRealSrcLoc fs (line+ 1 ) (cha+ 1 )
417
418
sp fs = mkRealSrcSpan (sloc fs) (sloc fs)
418
419
line = _line pos
You can’t perform that action at this time.
0 commit comments