Permalink
Browse files

GHC7 support

  • Loading branch information...
1 parent a6b9245 commit fe928fe79fb61ec480e407471c105b12114c8a43 @JPMoresmau committed Mar 16, 2011
Showing with 21 additions and 11 deletions.
  1. +8 −4 utils/GHC/SYB/Utils.hs
  2. +13 −7 utils/ghc-syb-utils.cabal
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{- | "GHC.Syb.Utils" provides common utilities for the Ghc Api,
either based on Data\/Typeable or for use with Data.Generics
over Ghc Api types.
@@ -185,7 +186,10 @@ import Var(Var)
import FastString(FastString)
import NameSet(NameSet,nameSetToList)
+#if __GLASGOW_HASKELL__ < 700
import GHC.SYB.Instances
+#endif
+
import Data.List
-- | Ghc Ast types tend to have undefined holes, to be filled
@@ -251,7 +255,7 @@ everythingStaged stage k z f x
-- | A variation of 'everything', using a 'GenericQ Bool' to skip
-- parts of the input 'Data'.
-everythingBut :: GenericQ Bool -> (r -> r -> r) -> r -> GenericQ r -> GenericQ r
-everythingBut q k z f x
- | q x = z
- | otherwise = foldl k (f x) (gmapQ (everythingBut q k z f) x)
+--everythingBut :: GenericQ Bool -> (r -> r -> r) -> r -> GenericQ r -> GenericQ r
+--everythingBut q k z f x
+-- | q x = z
+-- | otherwise = foldl k (f x) (gmapQ (everythingBut q k z f) x)
@@ -1,5 +1,5 @@
name: ghc-syb-utils
-version: 0.2.0.0
+version: 0.2.1.0
license: BSD3
license-file: LICENSE
author: Claus Reinke
@@ -15,12 +15,18 @@ cabal-version: >= 1.6
tested-with: GHC ==6.10.4, GHC ==6.12.1
library
- build-depends: base >= 4 && < 5,
- ghc-syb == 0.2.*,
- syb == 0.1.*,
- ghc >= 6.10 && < 6.14
-
+ build-depends: base >= 4 && < 5
+ , syb >= 0.1.0
+
+ if impl(ghc >= 7.0)
+ build-depends:
+ ghc
+ else
+ build-depends:
+ ghc >= 6.10,
+ ghc-syb == 0.2.*
+
hs-source-dirs: .
- extensions: Rank2Types
+ extensions: Rank2Types, CPP
exposed-modules: GHC.SYB.Utils

0 comments on commit fe928fe

Please sign in to comment.