geniplate-mirror 0.7.8 → 0.7.9
raw patch · 3 files changed
+29/−9 lines, 3 filesdep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
Files
- Data/Generics/Geniplate.hs +13/−6
- changelog +5/−1
- geniplate-mirror.cabal +11/−2
Data/Generics/Geniplate.hs view
@@ -14,10 +14,17 @@ import Control.Monad.State.Strict import Control.Monad.Identity import Data.Maybe-import Language.Haskell.TH+import Language.Haskell.TH hiding (conP) import Language.Haskell.TH.Syntax hiding (lift) --import System.IO +conP :: Name -> [Pat] -> Pat+#if MIN_VERSION_template_haskell(2,18,0)+conP c = ConP c []+#else+conP c = ConP c+#endif+ ---- Overloaded interface, same as Uniplate. -- | Class for 'universeBi'.@@ -378,9 +385,9 @@ uniBiCon :: Name -> [Type] -> Type -> U [Clause] uniBiCon con ts to = do (tvs, cons) <- getTyConInfo con- let genArm (NormalC c xs) = arm (ConP c) xs+ let genArm (NormalC c xs) = arm (conP c) xs genArm (InfixC x1 c x2) = arm (\ [p1, p2] -> InfixP p1 c p2) [x1, x2]- genArm (RecC c xs) = arm (ConP c) [ (b,t) | (_,b,t) <- xs ]+ genArm (RecC c xs) = arm (conP c) [ (b,t) | (_,b,t) <- xs ] genArm c = genError $ "uniBiCon: " ++ show c s = mkSubst tvs ts arm c xs = mkArm to s c $ map snd xs@@ -650,7 +657,7 @@ trBiList :: Bool -> Mode -> RetAp -> Exp -> Type -> Type -> Type -> U [Clause] trBiList seenStop doDescend ra f ft st et = do nil <- trMkArm seenStop doDescend ra f ft st [] (const $ ListP []) (ListE []) []- cons <- trMkArm seenStop doDescend ra f ft st [] (ConP '(:)) (ConE '(:)) [et, st]+ cons <- trMkArm seenStop doDescend ra f ft st [] (conP '(:)) (ConE '(:)) [et, st] return [nil, cons] trBiTuple :: Bool -> Mode -> RetAp -> Exp -> Type -> Type -> [Type] -> U [Clause]@@ -667,9 +674,9 @@ trBiCon :: Bool -> Mode -> RetAp -> Exp -> Name -> Type -> Type -> [Type] -> U [Clause] trBiCon seenStop doDescend ra f con ft st ts = do (tvs, cons) <- getTyConInfo con- let genArm (NormalC c xs) = arm (ConP c) (ConE c) xs+ let genArm (NormalC c xs) = arm (conP c) (ConE c) xs genArm (InfixC x1 c x2) = arm (\ [p1, p2] -> InfixP p1 c p2) (ConE c) [x1, x2]- genArm (RecC c xs) = arm (ConP c) (ConE c) [ (b,t) | (_,b,t) <- xs ]+ genArm (RecC c xs) = arm (conP c) (ConE c) [ (b,t) | (_,b,t) <- xs ] genArm c = genError $ "trBiCon: " ++ show c s = mkSubst tvs ts arm c ec xs = trMkArm seenStop doDescend ra f ft st s c ec $ map snd xs
changelog view
@@ -1,4 +1,8 @@-geniplate 0.7.8 (released 2020-06-18):+geniplate 0.7.9 (released 2023-01-23):+* Support template-haskell 2.19+* Tested with GHC 9.2.5, 9.0.2, 8.10.7, 8.8.4, 8.6.5, 8.4.4, 8.2.2, 8.0.2++geniplate 0.7.8 (released 2021-06-18): * Support GHC 9.0.1 geniplate 0.7.7 (released 2020-04-01):
geniplate-mirror.cabal view
@@ -1,5 +1,5 @@ Name: geniplate-mirror-Version: 0.7.8+Version: 0.7.9 Synopsis: Use Template Haskell to generate Uniplate-like functions. Description: Use Template Haskell to generate Uniplate-like functions. .@@ -17,6 +17,15 @@ Cabal-Version: >= 1.10 Build-type: Simple Stability: experimental+tested-with: GHC == 9.4.4+ , GHC == 9.2.5+ , GHC == 9.0.2+ , GHC == 8.10.7+ , GHC == 8.8.4+ , GHC == 8.6.5+ , GHC == 8.4.4+ , GHC == 8.2.2+ , GHC == 8.0.2 Extra-source-files: examples/Main.hs@@ -29,6 +38,6 @@ library Default-Language: Haskell98- Build-Depends: base >= 4 && < 5.0, template-haskell < 2.18, mtl+ Build-Depends: base >= 4 && < 5.0, template-haskell < 2.20, mtl Exposed-modules: Data.Generics.Geniplate