derive 2.5.24 → 2.5.25
raw patch · 6 files changed
+26/−4 lines, 6 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Language.Haskell: infix 1 ?
+ Language.Haskell.TH.Compat: instanceD :: Cxt -> Type -> [Dec] -> Dec
- Data.Derive.DSL.HSE: coerce :: (?callStack :: CallStack, Typeable (TYPE Lifted) a1, Typeable (TYPE Lifted) a) => a1 -> a
+ Data.Derive.DSL.HSE: coerce :: (Typeable * a, Typeable * a1) => a1 -> a
- Data.Derive.DSL.HSE: readCon :: (?callStack :: CallStack) -> DataType -> [Char] -> Constr
+ Data.Derive.DSL.HSE: readCon :: DataType -> [Char] -> Constr
- Language.Haskell.Convert: convert :: forall a b. Convert a b => a -> b
+ Language.Haskell.Convert: convert :: Convert a b => a -> b
Files
- CHANGES.txt +2/−0
- derive.cabal +1/−1
- src/Language/Haskell/Convert.hs +2/−1
- src/Language/Haskell/TH/Compat.hs +5/−0
- src/Language/Haskell/TH/Helper.hs +2/−2
- src/Language/Haskell/TH/Peephole.hs +14/−0
CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for Derive +2.5.25+ #14, further GHC 8.0.1 updates 2.5.24 #14, update to GHC 8.0.1 #15, move all the source files under src to speed up building
derive.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.8 build-type: Default name: derive-version: 2.5.24+version: 2.5.25 build-type: Simple copyright: Neil Mitchell 2006-2016 author: Neil Mitchell <ndmitchell@gmail.com>
src/Language/Haskell/Convert.hs view
@@ -4,6 +4,7 @@ import Language.Haskell as HS import Language.Haskell.TH.Syntax as TH+import Language.Haskell.TH.Compat import Control.Exception import Data.Typeable import System.IO.Unsafe@@ -106,7 +107,7 @@ instance Convert HS.Decl TH.Dec where- conv (InstDecl _ _ _ cxt nam typ ds) = InstanceD (c cxt) (c $ tyApp (TyCon nam) typ) [c d | InsDecl d <- ds]+ conv (InstDecl _ _ _ cxt nam typ ds) = instanceD (c cxt) (c $ tyApp (TyCon nam) typ) [c d | InsDecl d <- ds] conv (FunBind ms@(HS.Match _ nam _ _ _ _:_)) = FunD (c nam) (c ms) conv (PatBind _ p bod ds) = ValD (c p) (c bod) (c ds) conv (TypeSig _ [nam] typ) = SigD (c nam) (c $ foralls typ)
src/Language/Haskell/TH/Compat.hs view
@@ -15,6 +15,11 @@ fromTyVar v = v #endif +#if __GLASGOW_HASKELL__ >= 800+instanceD = InstanceD Nothing+#else+instanceD = InstanceD+#endif dataDefinitionTypeArgs :: Dec -> [Name] #if __GLASGOW_HASKELL__ >= 800
src/Language/Haskell/TH/Helper.hs view
@@ -56,7 +56,7 @@ instance_default n = instance_context [n] n instance_context :: [String] -> String -> DataDef -> [Dec] -> Dec-instance_context req cls dat defs = InstanceD ctx hed defs+instance_context req cls dat defs = instanceD ctx hed defs where vrs = vars 't' (dataArity dat) hed = l1 cls (lK (dataName dat) vrs)@@ -70,7 +70,7 @@ -- | Build an instance of a class for a data type, using the class at the given types generic_instance :: String -> DataDef -> [Type] -> [Dec] -> [Dec]-generic_instance cls dat ctxTypes defs = [InstanceD ctx hed defs]+generic_instance cls dat ctxTypes defs = [instanceD ctx hed defs] where vrs = vars 't' (dataArity dat) hed = l1 cls (lK (dataName dat) vrs)
src/Language/Haskell/TH/Peephole.hs view
@@ -1,5 +1,19 @@ {-# LANGUAGE PatternGuards #-} +{-# OPTIONS_GHC -Wwarn #-}+{-+Otherwise I get:++src/Language/Haskell/TH/Peephole.hs:64:1: warning:+ Pattern match checker exceeded (2000000) iterations in+ an equation for ‘peep’. (Use -fmax-pmcheck-iterations=n+ to set the maximun number of iterations to n)++Seriously. Your warning checker is crap. My code is fine.+Don't produce warnings about code I can't possibly fix.+Especially not by default.+-}+ module Language.Haskell.TH.Peephole(peephole, replaceVar, replaceVars) where import Language.Haskell.TH.Syntax