packages feed

monoid-subclasses 1.2 → 1.2.1

raw patch · 4 files changed

+13/−2 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@+Version 1.2.1+---------------+* Fix for the `Monus` instance for `Maybe` by Jonathan Knowles+ Version 1.2 ---------------+* Dropped support for GHC < 8.4 * Depending on new `commutative-semigroups` package * Modified the `instance OverlappingMonoid/Monus Map/IntMap` instances to conform with the class laws * Bumped the `vector` dependency upper bounds
Test/TestMonoidSubclasses.hs view
@@ -290,7 +290,9 @@ monusInstances = [MonusInstance (mempty :: Product Natural),                   MonusInstance (mempty :: Sum Natural),                   MonusInstance (mempty :: Dual (Product Natural)),+                  MonusInstance (mempty :: Maybe ()),                   MonusInstance (mempty :: Maybe (Product Natural)),+                  MonusInstance (mempty :: Maybe (Sum Natural)),                   MonusInstance (mempty :: IntSet),                   MonusInstance (mempty :: Set String)] 
monoid-subclasses.cabal view
@@ -1,5 +1,5 @@ Name:                monoid-subclasses-Version:             1.2+Version:             1.2.1 Cabal-Version:       >= 1.10 Build-Type:          Simple Synopsis:            Subclasses of Monoid
src/Data/Monoid/Monus.hs view
@@ -187,7 +187,11 @@ -- Maybe instances  instance (Monus a, MonoidNull a) => Monus (Maybe a) where-   Just a <\> Just b = Just (a <\> b)+   Just a <\> Just b+      | null remainder = Nothing+      | otherwise = Just remainder+    where+      remainder = a <\> b    Nothing <\> _ = Nothing    x <\> Nothing = x