packages feed

semigroups 0.3.4.2 → 0.4.0

raw patch · 2 files changed

+6/−21 lines, 2 filesdep −taggeddep −voidPVP ok

version bump matches the API change (PVP)

Dependencies removed: tagged, void

API changes (from Hackage documentation)

- Data.Semigroup: instance Semigroup (Proxy a)
- Data.Semigroup: instance Semigroup Void
- Data.Semigroup: instance Semigroup a => Semigroup (Tagged s a)
+ Data.Semigroup: instance Bounded m => Bounded (WrappedMonoid m)

Files

Data/Semigroup.hs view
@@ -40,9 +40,6 @@ import Data.Foldable import Data.Traversable -import Data.Void-import Data.Tagged-import Data.Proxy import Data.Sequence (Seq, (><)) import Data.Set (Set) import Data.IntSet (IntSet)@@ -105,11 +102,11 @@  instance Semigroup (Monoid.First a) where   Monoid.First Nothing <> b = b-  a             <> _ = a+  a                    <> _ = a  instance Semigroup (Monoid.Last a) where   a <> Monoid.Last Nothing = a-  _ <> b            = b+  _ <> b                   = b  newtype Min a = Min { getMin :: a } deriving    ( Eq, Ord, Bounded, Show, Read@@ -166,7 +163,7 @@  newtype WrappedMonoid m = WrapMonoid    { unwrapMonoid :: m } deriving -  ( Eq, Ord, Show, Read+  ( Eq, Ord, Bounded, Show, Read #ifdef LANGUAGE_DeriveDataTypeable   , Data, Typeable #endif@@ -181,7 +178,7 @@   -- | Option is effectively 'Maybe' with a better instance of 'Monoid', built off of an underlying 'Semigroup'--- instead of an underlying 'Monoid'.+-- instead of an underlying 'Monoid'. Ideally, this type would not exist at all and we would just fix the 'Monoid' intance of 'Maybe' newtype Option a = Option    { getOption :: Maybe a } deriving    ( Eq, Ord, Show, Read@@ -236,19 +233,10 @@   mempty = empty   Option a `mappend` Option b = Option (a <> b) --- | This lets you use a 'difference list' of a semigroup as a Monoid.+-- | This lets you use a difference list of a Semigroup as a Monoid. diff :: Semigroup m => m -> Endo m diff = Endo . (<>) -instance Semigroup Void where-  a <> _ = a--instance Semigroup a => Semigroup (Tagged s a) where-  Tagged a <> Tagged b = Tagged (a <> b)--instance Semigroup (Proxy a) where-  Proxy <> Proxy = Proxy- instance Semigroup (Seq a) where   (<>) = (><) @@ -263,4 +251,3 @@  instance Ord k => Semigroup (Map k v) where   (<>) = mappend-
semigroups.cabal view
@@ -1,6 +1,6 @@ name:          semigroups category:      Algebra, Data, Data Structures, Math-version:       0.3.4.2+version:       0.4.0 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE@@ -25,8 +25,6 @@ library   build-depends:      base >= 4 && < 4.4, -    void >= 0.4 && < 0.5, -    tagged >= 0.2 && < 0.3,      containers >= 0.3 && < 0.5    ghc-options: -Wall