packages feed

semigroupoids 5.0.0.4 → 5.0.1

raw patch · 6 files changed

+20/−28 lines, 6 filesdep ~comonaddep ~transformers-compat

Dependency ranges changed: comonad, transformers-compat

Files

CHANGELOG.markdown view
@@ -1,3 +1,9 @@+5.0.1+-------+* `transformers-compat` 0.5 support+* Removed some redundant constraints.+* GHC 8 support+ 5.0.0.4 ------- * `doctest` 0.10 support
semigroupoids.cabal view
@@ -1,6 +1,6 @@ name:          semigroupoids category:      Control, Comonads-version:       5.0.0.4+version:       5.0.1 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE@@ -119,7 +119,7 @@     bifunctors          >= 5       && < 6,     semigroups          >= 0.8.3.1 && < 1,     transformers        >= 0.2     && < 0.6,-    transformers-compat >= 0.3     && < 0.5+    transformers-compat >= 0.3     && < 0.6    if flag(containers)     build-depends: containers >= 0.3 && < 0.6
src/Data/Functor/Bind/Trans.hs view
@@ -46,10 +46,10 @@ instance BindTrans (ReaderT e) where   liftB = ReaderT . const -instance (Semigroup w, Monoid w) => BindTrans (Lazy.WriterT w) where+instance Monoid w => BindTrans (Lazy.WriterT w) where   liftB = Lazy.WriterT . fmap (\a -> (a, mempty)) -instance (Semigroup w, Monoid w) => BindTrans (Strict.WriterT w) where+instance Monoid w => BindTrans (Strict.WriterT w) where   liftB = Strict.WriterT . fmap (\a -> (a, mempty))  instance BindTrans (Lazy.StateT s) where@@ -58,10 +58,10 @@ instance BindTrans (Strict.StateT s) where   liftB m = Strict.StateT $ \s -> fmap (\a -> (a, s)) m -instance (Semigroup w, Monoid w) => BindTrans (Lazy.RWST r w s) where+instance Monoid w => BindTrans (Lazy.RWST r w s) where   liftB m = Lazy.RWST $ \ _r s -> fmap (\a -> (a, s, mempty)) m -instance (Semigroup w, Monoid w) => BindTrans (Strict.RWST r w s) where+instance Monoid w => BindTrans (Strict.RWST r w s) where   liftB m = Strict.RWST $ \ _r s -> fmap (\a -> (a, s, mempty)) m  instance BindTrans (ContT r) where
src/Data/Functor/Extend.hs view
@@ -24,7 +24,8 @@ import Control.Category import Control.Monad.Trans.Identity import Data.Functor.Identity-import Data.Semigroup+import Data.Functor.Sum (Sum(..))+import Data.Semigroup (Semigroup(..)) import Data.List (tails) import Data.List.NonEmpty (NonEmpty(..), toList) @@ -36,7 +37,6 @@   #ifdef MIN_VERSION_comonad-import Data.Functor.Coproduct import Control.Comonad.Trans.Env import Control.Comonad.Trans.Store import Control.Comonad.Trans.Traced@@ -95,10 +95,12 @@ #endif  #ifdef MIN_VERSION_comonad+{- instance (Extend f, Extend g) => Extend (Coproduct f g) where   extended f = Coproduct . coproduct     (Left . extended (f . Coproduct . Left))     (Right . extended (f . Coproduct . Right))+-}  instance Extend w => Extend (EnvT e w) where   duplicated (EnvT e wa) = EnvT e (extended (EnvT e) wa)@@ -132,6 +134,10 @@   extended f w@ ~(_ :| aas) = f w :| case aas of       []     -> []       (a:as) -> toList (extended f (a :| as))++instance (Extend f, Extend g) => Extend (Sum f g) where+  extended f (InL l) = InL (extended (f . InL) l)+  extended f (InR r) = InR (extended (f . InR) r)  -- $definition -- There are two ways to define an 'Extend' instance:
src/Data/Semigroup/Foldable/Class.hs view
@@ -35,10 +35,6 @@ import Data.Foldable import Data.Functor.Compose -#ifdef MIN_VERSION_comonad-import Data.Functor.Coproduct-#endif- import Data.Functor.Identity import Data.Functor.Product as Functor import Data.Functor.Reverse@@ -167,11 +163,6 @@ instance (Foldable1 f, Foldable1 g) => Foldable1 (Sum f g) where   foldMap1 f (InL x) = foldMap1 f x   foldMap1 f (InR y) = foldMap1 f y--#ifdef MIN_VERSION_comonad-instance (Foldable1 f, Foldable1 g) => Foldable1 (Coproduct f g) where-  foldMap1 f = coproduct (foldMap1 f) (foldMap1 f)-#endif  instance Foldable1 NonEmpty where   foldMap1 f (a :| []) = f a
src/Data/Semigroup/Traversable/Class.hs view
@@ -31,10 +31,6 @@ import Data.Functor.Apply import Data.Functor.Compose -#ifdef MIN_VERSION_comonad-import Data.Functor.Coproduct as Functor-#endif- import Data.Functor.Identity import Data.Functor.Product as Functor import Data.Functor.Reverse@@ -170,13 +166,6 @@ instance (Traversable1 f, Traversable1 g) => Traversable1 (Functor.Sum f g) where   traverse1 f (Functor.InL x) = Functor.InL <$> traverse1 f x   traverse1 f (Functor.InR y) = Functor.InR <$> traverse1 f y--#ifdef MIN_VERSION_comonad-instance (Traversable1 f, Traversable1 g) => Traversable1 (Coproduct f g) where-  traverse1 f = coproduct-    (fmap (Coproduct . Left) . traverse1 f)-    (fmap (Coproduct . Right) . traverse1 f)-#endif  #ifdef MIN_VERSION_containers instance Traversable1 Tree where