packages feed

strict-base-types 0.6.0 → 0.6.1

raw patch · 4 files changed

+30/−7 lines, 4 filesdep +semigroupsdep ~basedep ~strict

Dependencies added: semigroups

Dependency ranges changed: base, strict

Files

CHANGES view
@@ -1,3 +1,8 @@+* 0.6.1+  - Add contributions by Oleg Grenrus (@phadej)+    - Make 'Semigroup' instances available on all `base` versions.+    - Add 'Semigroup (Pair a b)' instance+ * 0.6.0   - Add contribution by Bas van Dijk (@basvandijk)     - Add 'Semigroup' instance for base-4.9.0.0
src/Data/Maybe/Strict.hs view
@@ -72,10 +72,8 @@ #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@@ -100,19 +98,22 @@ 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 +#if MIN_VERSION_base(4,11,0)+instance Semigroup a => Monoid (Maybe a) where+  mempty = Nothing+#else instance Monoid a => Monoid (Maybe a) where   mempty = Nothing    Nothing `mappend` m       = m   m       `mappend` Nothing = m   Just x1 `mappend` Just x2 = Just (x1 `mappend` x2)+#endif  -- foldable instance Foldable Maybe where
src/Data/Tuple/Strict.hs view
@@ -72,6 +72,7 @@ #endif import           Test.QuickCheck     (Arbitrary (..)) import           Data.Hashable       (Hashable(..))+import           Data.Semigroup      (Semigroup (..))  #if __HADDOCK__ import Data.Tuple ()@@ -110,6 +111,9 @@  instance Traversable (Pair e) where   traverse f (e :!: x) = (:!:) e <$> f x++instance (Semigroup a, Semigroup b) => Semigroup (Pair a b) where+  (x1 :!: y1) <> (x2 :!: y2) = (x1 <> x2) :!: (y1 <> y2)  instance (Monoid a, Monoid b) => Monoid (Pair a b) where   mempty                            = mempty :!: mempty
strict-base-types.cabal view
@@ -1,5 +1,5 @@ Name:           strict-base-types-Version:        0.6.0+Version:        0.6.1 Synopsis:       Strict variants of the types provided in base. Category:       Data Description:@@ -100,7 +100,14 @@ Homepage:       https://github.com/meiersi/strict-base-types Cabal-Version: >= 1.6 Build-type:     Simple-Tested-with:    GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.2+Tested-with:+  GHC==7.4.2,+  GHC==7.6.3,+  GHC==7.8.4,+  GHC==7.10.3,+  GHC==8.0.2,+  GHC==8.2.2,+  GHC==8.4.1  extra-source-files:   CHANGES@@ -111,6 +118,8 @@  library   ghc-options:    -Wall -fwarn-incomplete-uni-patterns+  if impl(ghc >= 8.0)+    ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances   build-depends:       base       >= 4.5 && < 5     , lens       >= 3.9@@ -119,9 +128,13 @@     , binary     >= 0.5     , deepseq    >= 1.3     , hashable   >= 1.1.1.0-    , strict     == 0.3.*+    , strict     >= 0.3.2 && <0.4     , bifunctors >= 3.0     , ghc-prim++  if !impl(ghc >= 8.0)+    build-depends: semigroups >= 0.18.3+   hs-source-dirs:    src   exposed-modules:       Data.Tuple.Strict