packages feed

recursion-schemes 0.4.2 → 0.4.3

raw patch · 2 files changed

+22/−3 lines, 2 filesdep +freedep ~streamsdep ~transformers

Dependencies added: free

Dependency ranges changed: streams, transformers

Files

Data/Functor/Foldable.hs view
@@ -27,6 +27,7 @@   , gzygo   , histo   , ghisto+  , futu   -- ** Distributive laws   , distCata   , distPara@@ -35,6 +36,8 @@   , distZygoT   , distHisto   , distGHisto+  , distFutu+  , distGFutu   -- * Unfolding   , Unfoldable(..)   -- ** Combinators@@ -67,6 +70,7 @@ import Control.Comonad.Trans.Class import Control.Comonad.Trans.Env import Control.Monad (liftM, join)+import Control.Monad.Free import Data.Functor.Identity import Control.Arrow import Data.Function (on)@@ -235,6 +239,16 @@ ghylo w m f g = extract . h . return where    h = fmap f . w . fmap (duplicate . h . join) . m . liftM g grefold w m f g a = ghylo w m f g a++futu :: Unfoldable t => (a -> Base t (Free (Base t) a)) -> a -> t +futu = gana distFutu++distFutu :: Functor f => Free f (f a) -> f (Free f a)+distFutu = distGFutu id++distGFutu :: (Functor f, Functor h) => (forall b. h (f b) -> f (h b)) -> Free h (f a) -> f (Free h a)+distGFutu _ (Pure fa) = Pure <$> fa +distGFutu k (Free as) = Free <$> k (distGFutu k <$> as)  newtype Fix f = Fix (f (Fix f)) 
recursion-schemes.cabal view
@@ -1,6 +1,6 @@ name:          recursion-schemes category:      Control, Recursion-version:       0.4.2+version:       0.4.3 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE@@ -13,6 +13,10 @@ description:      Generalized bananas, lenses and barbed wire   . +  /Changes since 0.4.2/:+  .+  * Added futumorphisms+  .   /Changes since 0.2.2/:   .   * Split distHisto from distGHisto@@ -42,10 +46,11 @@ library   build-depends:      base >= 4 && < 4.4,-    transformers >= 0.2.0 && < 0.3,+    transformers >= 0.2 && < 0.3,     comonad >= 1.1 && < 1.2,     comonad-transformers >= 1.6.2 && < 1.7,-    streams >= 0.7.0 && < 0.8+    free >= 0.2 && < 0.3,+    streams >= 0.7 && < 0.8    exposed-modules:     Data.Functor.Foldable