derive 2.5.10 → 2.5.11
raw patch · 3 files changed
+18/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Language/Haskell/Convert.hs +12/−0
- Language/Haskell/TH/FixedPpr.hs +5/−0
- derive.cabal +1/−1
Language/Haskell/Convert.hs view
@@ -238,9 +238,15 @@ conv (PlainTV x) = UnkindedVar $ c x conv (KindedTV x y) = KindedVar (c x) $ c y +#if __GLASGOW_HASKELL__ < 706 instance Convert TH.Kind HS.Kind where conv StarK = KindStar conv (ArrowK x y) = KindFn (c x) $ c y+#else+instance Convert TH.Kind HS.Kind where+ conv StarT = KindStar+ conv (AppT (AppT ArrowT x) y) = KindFn (c x) (c y)+#endif instance Convert TH.Pred HS.Asst where conv (ClassP x y) = ClassA (UnQual $ c x) $ c y@@ -254,7 +260,13 @@ conv (UnkindedVar x) = PlainTV $ c x conv (KindedVar x y) = KindedTV (c x) $ c y +#if __GLASGOW_HASKELL__ < 706 instance Convert HS.Kind TH.Kind where conv KindStar = StarK conv (KindFn x y) = ArrowK (c x) $ c y+#else+instance Convert HS.Kind TH.Kind where+ conv KindStar = StarT+ conv (KindFn x y) = AppT (AppT ArrowT (c x)) (c y)+#endif #endif
Language/Haskell/TH/FixedPpr.hs view
@@ -349,6 +349,9 @@ ppr (ForallT tvars ctxt ty) = text "forall" <+> hsep (map ppr tvars) <+> text "." <+> pprCxt ctxt <+> ppr ty+#if __GLASGOW_HASKELL__ >= 706+ ppr StarT = text "*"+#endif ppr ty = pprTyApp (split ty) pprTyApp :: (Type, [Type]) -> Doc@@ -396,9 +399,11 @@ ppr (PlainTV v) = ppr v ppr (KindedTV v k) = parens $ ppr v <+> text "::" <+> ppr k +#if __GLASGOW_HASKELL__ < 706 instance Ppr Kind where ppr StarK = text "*" ppr (ArrowK j k) = ppr j <+> text "->" <+> ppr k+#endif instance Ppr Pred where ppr (ClassP n ts) = ppr n <+> hsep (map ppr ts)
derive.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 build-type: Default name: derive-version: 2.5.10+version: 2.5.11 build-type: Simple copyright: Neil Mitchell 2006-2012 author: Neil Mitchell <ndmitchell@gmail.com>