simplify a bit
This commit is contained in:
parent
122167f4c1
commit
84d7747c1b
4
Info.hs
4
Info.hs
@ -82,9 +82,7 @@ findExpr tcm line col =
|
|||||||
in listifyStaged TypeChecker f src
|
in listifyStaged TypeChecker f src
|
||||||
where
|
where
|
||||||
f :: LHsExpr Id -> Bool
|
f :: LHsExpr Id -> Bool
|
||||||
f (L spn _)
|
f (L spn _) = isGoodSrcSpan spn && spn `spans` (line, col)
|
||||||
| isGoodSrcSpan spn = spn `spans` (line, col)
|
|
||||||
| otherwise = False
|
|
||||||
|
|
||||||
listifyStaged :: Typeable r => Stage -> (r -> Bool) -> GenericQ [r]
|
listifyStaged :: Typeable r => Stage -> (r -> Bool) -> GenericQ [r]
|
||||||
listifyStaged s p = everythingStaged s (++) [] ([] `mkQ` (\x -> if p x then [x] else []))
|
listifyStaged s p = everythingStaged s (++) [] ([] `mkQ` (\x -> if p x then [x] else []))
|
||||||
|
Loading…
Reference in New Issue
Block a user