packages feed

monadic-recursion-schemes 0.1.10.0 → 0.1.11.0

raw patch · 3 files changed

+15/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Functor.Foldable.Monadic: gcataM' :: (Monad m, Comonad w, Traversable w, Traversable (Base t), Recursive t, b ~ w a) => (Base t (w b) -> m (w (Base t b))) -> (Base t (w a) -> m a) -> t -> m a

Files

CHANGELOG.md view
@@ -1,8 +1,12 @@ # Revision history for monadic-recursion-schemes +## 0.1.11.0 -- 2020-05-21++* add gcataM' which is gcataM variant correspond to recursion-schemes gcata.+ ## 0.1.10.0 -- 2020-05-21 -* add new member 'gcataM' which is a generalized morphism of catamorphism.+* add new member gcataM which is a generalized morphism of catamorphism.  ## 0.1.9.1 -- 2020-05-17 
monadic-recursion-schemes.cabal view
@@ -4,7 +4,7 @@ -- http://haskell.org/cabal/users-guide/  name:                monadic-recursion-schemes-version:             0.1.10.0+version:             0.1.11.0 synopsis:            Recursion Schemes for Monadic version. description:         Yet another recursion schemes for monadic style, depends on recursion-schemes. homepage:            https://github.com/cutsea110/monadic-recursion-schemes.git
src/Data/Functor/Foldable/Monadic.hs view
@@ -30,7 +30,7 @@   , chronoM' -- cochronoM'      -- * Generalized Folding-  , gcataM+  , gcataM, gcataM'      -- * Others   , mutuM, comutuM@@ -294,3 +294,11 @@        -> t -> m a gcataM k g = liftM extract . cataM phi   where phi = mapM g <=< k <=< return . fmap duplicate++gcataM' :: (Monad m, Comonad w, Traversable w, Traversable (Base t), Recursive t, b ~ w a)+        => (Base t (w b) -> m (w (Base t b))) -- ^ Distributive (Base t) w b+        -> (Base t (w a) -> m a)              -- ^ algebra+        -> t -> m a+gcataM' k g = g <=< return . extract <=< c+  where c = k <=< mapM u . project+        u = return . duplicate <=< mapM g <=< c