strict-base-types 0.5.0 → 0.6.0
raw patch · 3 files changed
+16/−1 lines, 3 files
Files
- CHANGES +4/−0
- src/Data/Maybe/Strict.hs +11/−0
- strict-base-types.cabal +1/−1
CHANGES view
@@ -1,3 +1,7 @@+* 0.6.0+ - Add contribution by Bas van Dijk (@basvandijk)+ - Add 'Semigroup' instance for base-4.9.0.0+ * 0.5.0 - Change the implementation of the 'Monoid Maybe' instance such that it is the same as the one for the lazy 'Maybe'; i.e., we now use
src/Data/Maybe/Strict.hs view
@@ -72,6 +72,10 @@ #endif import Test.QuickCheck (Arbitrary (..)) import Data.Hashable (Hashable(..))+#if MIN_VERSION_base(4,9,0)+import Data.Semigroup (Semigroup)+import qualified Data.Semigroup as Semigroup+#endif -- utilities@@ -94,6 +98,13 @@ #if __GLASGOW_HASKELL__ >= 706 deriving instance Generic (Maybe a)+#endif++#if MIN_VERSION_base(4,9,0)+instance Semigroup a => Semigroup (Maybe a) where+ Nothing <> m = m+ m <> Nothing = m+ Just x1 <> Just x2 = Just (x1 Semigroup.<> x2) #endif instance Monoid a => Monoid (Maybe a) where
strict-base-types.cabal view
@@ -1,5 +1,5 @@ Name: strict-base-types-Version: 0.5.0+Version: 0.6.0 Synopsis: Strict variants of the types provided in base. Category: Data Description: