simplify a bit

This commit is contained in:
eagletmt 2012-02-14 11:54:48 +09:00
parent 122167f4c1
commit 84d7747c1b
1 changed files with 1 additions and 3 deletions

View File

@ -82,9 +82,7 @@ findExpr tcm line col =
in listifyStaged TypeChecker f src
where
f :: LHsExpr Id -> Bool
f (L spn _)
| isGoodSrcSpan spn = spn `spans` (line, col)
| otherwise = False
f (L spn _) = isGoodSrcSpan spn && spn `spans` (line, col)
listifyStaged :: Typeable r => Stage -> (r -> Bool) -> GenericQ [r]
listifyStaged s p = everythingStaged s (++) [] ([] `mkQ` (\x -> if p x then [x] else []))