instant-generics 0.4 → 0.4.1
raw patch · 2 files changed
+11/−2 lines, 2 filesdep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
- Generics.Instant.Base: instance Read a => Read (CEq k k1 c p p a)
- Generics.Instant.Base: instance Show a => Show (CEq k k1 c p q a)
- Generics.Instant.Functions.Empty: instance [overlap ok] Empty a => Empty (CEq k k1 c p p a)
- Generics.Instant.Functions.Empty: instance [overlap ok] HasRec a => HasRec (CEq k k1 c p q a)
- Generics.Instant.Functions.Enum: instance [overlap ok] GEnum (CEq k k1 c p q a)
- Generics.Instant.Functions.Enum: instance [overlap ok] GEnum a => GEnum (CEq k k1 c p p a)
- Generics.Instant.Functions.Eq: instance [overlap ok] GEq' a => GEq' (CEq k k1 c p q a)
- Generics.Instant.Functions.Show: instance [overlap ok] (GShow' a, Constructor k c) => GShow' (CEq k k1 c p q a)
- Generics.Instant.Instances: instance Constructor * List_Cons_
- Generics.Instant.Instances: instance Constructor * List_Nil_
- Generics.Instant.Instances: instance Constructor * Maybe_Just_
- Generics.Instant.Instances: instance Constructor * Maybe_Nothing_
- Generics.Instant.Instances: instance Constructor * Tuple_Pair_
- Generics.Instant.Instances: instance Representable a => Representable (CEq * * c p q a)
+ Generics.Instant.Base: instance Read a => Read (CEq c p p a)
+ Generics.Instant.Base: instance Show a => Show (CEq c p q a)
+ Generics.Instant.Functions.Empty: instance [overlap ok] Empty a => Empty (CEq c p p a)
+ Generics.Instant.Functions.Empty: instance [overlap ok] HasRec a => HasRec (CEq c p q a)
+ Generics.Instant.Functions.Enum: instance [overlap ok] GEnum (CEq c p q a)
+ Generics.Instant.Functions.Enum: instance [overlap ok] GEnum a => GEnum (CEq c p p a)
+ Generics.Instant.Functions.Eq: instance [overlap ok] GEq' a => GEq' (CEq c p q a)
+ Generics.Instant.Functions.Show: instance [overlap ok] (GShow' a, Constructor c) => GShow' (CEq c p q a)
+ Generics.Instant.Instances: instance Constructor List_Cons_
+ Generics.Instant.Instances: instance Constructor List_Nil_
+ Generics.Instant.Instances: instance Constructor Maybe_Just_
+ Generics.Instant.Instances: instance Constructor Maybe_Nothing_
+ Generics.Instant.Instances: instance Constructor Tuple_Pair_
+ Generics.Instant.Instances: instance Representable a => Representable (CEq c p q a)
- Generics.Instant.Base: (:*:) :: a -> b -> :*: a b
+ Generics.Instant.Base: (:*:) :: a -> b -> (:*:) a b
- Generics.Instant.Base: L :: a -> :+: a b
+ Generics.Instant.Base: L :: a -> (:+:) a b
- Generics.Instant.Base: R :: b -> :+: a b
+ Generics.Instant.Base: R :: b -> (:+:) a b
Files
- instant-generics.cabal +1/−1
- src/Generics/Instant/TH.hs +10/−1
instant-generics.cabal view
@@ -1,7 +1,7 @@ category: Generics copyright: (c) 2011 Universiteit Utrecht, 2012 University of Oxford name: instant-generics -version: 0.4 +version: 0.4.1 license: BSD3 license-file: LICENSE author: José Pedro Magalhães
src/Generics/Instant/TH.hs view
@@ -213,7 +213,12 @@ liftM (:[]) $ instanceD (cxt []) (conT ''Representable `appT` typ t) - [ tySynInstD ''Rep [typ t] (typ (genRepName t)) + [ +#if __GLASGOW_HASKELL__ >= 707 + tySynInstD ''Rep (tySynEqn [typ t] (typ (genRepName t))) +#else + tySynInstD ''Rep [typ t] (typ (genRepName t)) +#endif , {- inlPrg, -} funD 'from fcs, funD 'to tcs] constrInstance :: Name -> Q [Dec] @@ -381,7 +386,11 @@ genExTyFamInsts' dt (ForallC vs cxt c) = do let mR = mobilityRules (tyVarBndrsToNames vs) cxt conName = ConT (genName [dt,getConName c]) +#if __GLASGOW_HASKELL__ >= 707 + tySynInst ty n x = TySynInstD ''X (TySynEqn [conName, int2TLNat n, ty] x) +#else tySynInst ty n x = TySynInstD ''X [conName, int2TLNat n, ty] x +#endif return [ tySynInst ty n (VarT nm) | (n,(nm, ty)) <- zip [0..] mR ] genExTyFamInsts' _ _ = return []