packages feed

profunctors 5.6.1 → 5.6.2

raw patch · 3 files changed

+31/−2 lines, 3 filesdep ~base-orphansdep ~semigroupsdep ~transformers

Dependency ranges changed: base-orphans, semigroups, transformers

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+5.6.2 [2021.02.17]+------------------+* Add `Semigroup` and `Monoid` instances for `Forget`+ 5.6.1 [2020.12.31] ------------------ * Add `Functor` instances for `PastroSum`, `CopastroSum`, `Environment`,
profunctors.cabal view
@@ -1,6 +1,6 @@ name:          profunctors category:      Control, Categories-version:       5.6.1+version:       5.6.2 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE
src/Data/Profunctor/Types.hs view
@@ -41,11 +41,18 @@ import Data.Distributive import Data.Foldable import Data.Functor.Contravariant-import Data.Monoid hiding (Product) import Data.Profunctor.Unsafe import Data.Traversable import Prelude hiding (id,(.)) +#if !(MIN_VERSION_base(4,8,0))+import Data.Monoid (Monoid(..))+#endif++#if !(MIN_VERSION_base(4,11,0))+import Data.Semigroup (Semigroup(..))+#endif+ infixr 0 :->  -- | (':->') has a polymorphic kind since @5.6@.@@ -243,3 +250,21 @@ instance Contravariant (Forget r a) where   contramap _ (Forget k) = Forget k   {-# INLINE contramap #-}++-- | Via @Semigroup r => (a -> r)@+--+-- @since 5.6.2+instance Semigroup r => Semigroup (Forget r a b) where+  Forget f <> Forget g = Forget (f <> g)+  {-# INLINE (<>) #-}++-- | Via @Monoid r => (a -> r)@+--+-- @since 5.6.2+instance Monoid r => Monoid (Forget r a b) where+  mempty = Forget mempty+  {-# INLINE mempty #-}+#if !(MIN_VERSION_base(4,11,0))+  mappend (Forget f) (Forget g) = Forget (mappend f g)+  {-# INLINE mappend #-}+#endif