packages feed

free 5 → 5.0.1

raw patch · 5 files changed

+21/−8 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+5.0.1 [2018.03.07]+------------------+* Fix the build on old GHCs with `transformers-0.4`.+ 5 [2018.01.28] -------------- * Add a `Semigroup` instance for `IterT`.
examples/free-examples.cabal view
@@ -45,7 +45,8 @@     base == 4.*,     free,     HGL,-    mtl  >= 2.0.1 && < 2.3+    mtl          >= 2.0.1 && < 2.3,+    transformers >= 0.2   && < 0.6  executable free-newton-coiter   hs-source-dirs: .
free.cabal view
@@ -1,6 +1,6 @@ name:          free category:      Control, Monads-version:       5+version:       5.0.1 license:       BSD3 cabal-version: >= 1.18 license-file:  LICENSE@@ -84,7 +84,7 @@     transformers-base    < 0.5,     transformers-compat  >= 0.3     && < 1,     template-haskell     >= 2.7.0.0 && < 3,-    exceptions           >= 0.6 && < 0.9,+    exceptions           >= 0.6 && < 0.10,     containers           < 0.6    exposed-modules:
src/Control/Monad/Free/Ap.hs view
@@ -12,17 +12,17 @@ -- | -- \"Applicative Effects in Free Monads\" ----- Often times, the '(<*>)' operator can be more efficient than 'ap'.+-- Often times, the '(\<*\>)' operator can be more efficient than 'ap'. -- Conventional free monads don't provide any means of modeling this. -- The free monad can be modified to make use of an underlying applicative.--- But it does require some laws, or else the '(<*>)' = 'ap' law is broken.+-- But it does require some laws, or else the '(\<*\>)' = 'ap' law is broken. -- When interpreting this free monad with 'foldFree', -- the natural transformation must be an applicative homomorphism. -- An applicative homomorphism @hm :: (Applicative f, Applicative g) => f x -> g x@ -- will satisfy these laws. -- -- * @hm (pure a) = pure a@--- * @hm (f <*> a) = hm f <*> hm a@+-- * @hm (f \<*\> a) = hm f \<*\> hm a@ -- -- This is based on the \"Applicative Effects in Free Monads\" series of articles by Will Fancher --
src/Control/Monad/Trans/Free/Church.hs view
@@ -80,10 +80,18 @@ instance (Functor f, Monad m, Ord1 f, Ord1 m) => Ord1 (FT f m) where   liftCompare cmp x y= liftCompare cmp (fromFT x) (fromFT y) #else-instance (Functor f, Monad m, Eq1 f, Eq1 m) => Eq1 (FT f m) where+instance ( Functor f, Monad m, Eq1 f, Eq1 m+# if !(MIN_VERSION_base(4,8,0))+         , Functor m+# endif+         ) => Eq1 (FT f m) where   eq1 x y = eq1 (fromFT x) (fromFT y) -instance (Functor f, Monad m, Ord1 f, Ord1 m) => Ord1 (FT f m) where+instance ( Functor f, Monad m, Ord1 f, Ord1 m+# if !(MIN_VERSION_base(4,8,0))+         , Functor m+# endif+         ) => Ord1 (FT f m) where   compare1 x y = compare1 (fromFT x) (fromFT y) #endif