HaRe 0.7.0.3 → 0.7.0.4
raw patch · 2 files changed
+9/−4 lines, 2 files
Files
HaRe.cabal view
@@ -1,5 +1,5 @@ Name: HaRe-Version: 0.7.0.3+Version: 0.7.0.4 Author: Chris Brown, Huiqing Li, Simon Thompson, Alan Zimmerman Maintainer: Alan Zimmerman Stability: Alpha
src/Language/Haskell/Refact/Utils/GhcUtils.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -170,7 +171,10 @@ -- | Checks whether the current item is undesirable for analysis in the current -- AST Stage. checkItemStage :: (Typeable a, Data a) => SYB.Stage -> a -> Bool-checkItemStage stage x = (checkItemStage1 stage x) || (checkItemStage2 stage x)+checkItemStage stage x = (checkItemStage1 stage x)+#if __GLASGOW_HASKELL__ > 704+ || (checkItemStage2 stage x)+#endif -- Check the Typeable items checkItemStage1 :: (Typeable a) => SYB.Stage -> a -> Bool@@ -179,12 +183,13 @@ postTcType = const (stage < SYB.TypeChecker ) :: GHC.PostTcType -> Bool fixity = const (stage < SYB.Renamer ) :: GHC.Fixity -> Bool +#if __GLASGOW_HASKELL__ > 704 -- | Check the Typeable1 items checkItemStage2 :: Data a => SYB.Stage -> a -> Bool checkItemStage2 stage x = (const False `SYB.ext1Q` hsWithBndrs) x where hsWithBndrs = const (stage < SYB.Renamer) :: GHC.HsWithBndrs a -> Bool-+#endif checkItemRenamer :: (Data a, Typeable a) => a -> Bool checkItemRenamer x = checkItemStage SYB.Renamer x@@ -327,7 +332,7 @@ | isJust maybeNameSet = checkItemStage stage (fromJust maybeNameSet) | isJust maybePostTcType = checkItemStage stage (fromJust maybePostTcType) | isJust maybeFixity = checkItemStage stage (fromJust maybeFixity)- -- | isJust maybeHsWithBndrs = checkItemStage stage (fromJust maybeHsWithBndrs)+ -- was | isJust maybeHsWithBndrs = checkItemStage stage (fromJust maybeHsWithBndrs) | otherwise = False where maybeNameSet :: Maybe GHC.NameSet