packages feed

free 0.2.2 → 0.2.3

raw patch · 3 files changed

+11/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Comonad.Cofree: section :: Comonad f => f a -> Cofree f a
+ Control.Monad.Free: instance (Functor v, MonadPlus v) => MonadPlus (Free v)
+ Control.Monad.Free: instance Alternative v => Alternative (Free v)

Files

Control/Comonad/Cofree.hs view
@@ -14,6 +14,7 @@ ---------------------------------------------------------------------------- module Control.Comonad.Cofree   ( Cofree(..)+  , section   , outCofree   , coiter   , unfold
Control/Monad/Free.hs view
@@ -19,7 +19,7 @@   ) where  import Control.Applicative-import Control.Monad (liftM)+import Control.Monad (liftM, MonadPlus(..)) import Control.Monad.Trans.Class import Data.Functor.Bind import Data.Foldable@@ -83,6 +83,14 @@   return = Pure   Pure a >>= f = f a   Free m >>= f = Free ((>>= f) <$> m)++instance Alternative v => Alternative (Free v) where+  empty = Free empty+  a <|> b = Free (pure a <|> pure b)++instance (Functor v, MonadPlus v) => MonadPlus (Free v) where+  mzero = Free mzero+  a `mplus` b = Free (return a `mplus` return b)  instance MonadTrans Free where   lift = Free . liftM Pure
free.cabal view
@@ -1,6 +1,6 @@ name:          free category:      Control, Monads-version:       0.2.2+version:       0.2.3 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE