packages feed

recursion-schemes 5.1.1 → 5.1.1.1

raw patch · 4 files changed

+16/−19 lines, 4 filesdep ~basePVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Data.Functor.Foldable: instance Data.Functor.Foldable.GCoerce GHC.Generics.U1 GHC.Generics.U1
+ Data.Functor.Foldable: instance Data.Functor.Foldable.GCoerce GHC.Generics.V1 GHC.Generics.V1

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+## 5.1.1.1+* Fix the `Generic`-based instances to also support data constructors with zero+  arguments (and datatypes with zero constructors).+ ## 5.1.1  * Add `cotransverse`
examples/Expr.hs view
@@ -30,7 +30,8 @@     ) ''Expr2  data Expr3 a-    = Lit3 a+    = Unit3+    | Lit3 a     | Add3 (Expr3 a) (Expr3 a)     | OpA (Expr3 a) (Expr3 a) Int     | OpB (Expr3 a) (Expr3 a) Char@@ -41,7 +42,8 @@   deriving (Show, Generic)  data Expr3F a b-    = Lit3F a+    = Unit3F+    | Lit3F a     | Add3F b b     | OpAF b b Int     | OpBF b b Char
recursion-schemes.cabal view
@@ -1,6 +1,6 @@ name:          recursion-schemes category:      Control, Recursion-version:       5.1.1+version:       5.1.1.1 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE
src/Data/Functor/Foldable.hs view
@@ -118,7 +118,7 @@ import qualified Data.Data as Data #endif #if HAS_GENERIC-import GHC.Generics (Generic (..), M1 (..), K1 (..), (:+:) (..), (:*:) (..))+import GHC.Generics (Generic (..), M1 (..), V1, U1, K1 (..), (:+:) (..), (:*:) (..)) #endif #if HAS_GENERIC1 import GHC.Generics (Generic1)@@ -815,21 +815,6 @@ cotransverse n = ana (n . fmap project)  ---------------------------------------------------------------------------------- Not exposed anywhere------------------------------------------------------------------------------------ | Read a list (using square brackets and commas), given a function--- for reading elements.-_readListWith :: ReadS a -> ReadS [a]-_readListWith rp =-    readParen False (\r -> [pr | ("[",s) <- lex r, pr <- readl s])-  where-    readl s = [([],t) | ("]",t) <- lex s] ++-        [(x:xs,u) | (x,t) <- rp s, (xs,u) <- readl' t]-    readl' s = [([],t) | ("]",t) <- lex s] ++-        [(x:xs,v) | (",",t) <- lex s, (x,u) <- rp t, (xs,v) <- readl' u]--------------------------------------------------------------------------------- -- GCoerce ------------------------------------------------------------------------------- @@ -842,6 +827,12 @@ -- R changes to/from P with GHC-7.4.2 at least. instance GCoerce (K1 i c) (K1 j c) where     gcoerce = K1 . unK1++instance GCoerce U1 U1 where+    gcoerce = id++instance GCoerce V1 V1 where+    gcoerce = id  instance (GCoerce f g, GCoerce f' g') => GCoerce (f :*: f') (g :*: g') where     gcoerce (x :*: y) = gcoerce x :*: gcoerce y