diff --git a/Check.hs b/Check.hs index a09e797..8d2f7da 100644 --- a/Check.hs +++ b/Check.hs @@ -13,8 +13,7 @@ import Types ---------------------------------------------------------------- checkSyntax :: Options -> String -> IO String -checkSyntax opt file = - unlines <$> check opt file +checkSyntax opt file = unlines <$> check opt file ---------------------------------------------------------------- diff --git a/Info.hs b/Info.hs index f7904b9..fe9e7d1 100644 --- a/Info.hs +++ b/Info.hs @@ -7,12 +7,12 @@ import Control.Applicative import CoreUtils import Data.Function import Data.Generics -import GHC.SYB.Utils import Data.List import Data.Maybe import Data.Ord as O import Desugar import GHC +import GHC.SYB.Utils import GHCApi import qualified Gap import HscTypes @@ -75,7 +75,7 @@ findExpr tcm line col = 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 [])) +listifyStaged s p = everythingStaged s (++) [] ([] `mkQ` (\x -> [x | p x])) getType :: GhcMonad m => TypecheckedModule -> LHsExpr Id -> m (Maybe (SrcSpan, Type)) getType tcm e = do