semigroups 0.18.1 → 0.18.2
raw patch · 4 files changed
+34/−13 lines, 4 filesdep +bytestring-builderdep ~binarydep ~bytestringnew-uploader
Dependencies added: bytestring-builder
Dependency ranges changed: binary, bytestring
Files
- CHANGELOG.markdown +5/−0
- semigroups.cabal +15/−3
- src-ghc7/Data/List/NonEmpty.hs +1/−1
- src-ghc7/Data/Semigroup.hs +13/−9
CHANGELOG.markdown view
@@ -1,3 +1,8 @@+0.18.2+------+* Depend on the `bytestring-builder` package to ensure `Semigroup` instances for bytestring `Builder` and `ShortByteString` are always defined+* Allow building with `binary-0.8.3` and later+ 0.18.1 ------ * Add the missing instance for `Data.Binary.Builder.Builder`.
semigroups.cabal view
@@ -1,6 +1,6 @@ name: semigroups category: Algebra, Data, Data Structures, Math-version: 0.18.1+version: 0.18.2 license: BSD3 cabal-version: >= 1.10 license-file: LICENSE@@ -48,6 +48,14 @@ default: True manual: True +flag bytestring-builder+ description:+ You can disable the use of the `bytestring-builder` package using `-f-bytestring-builder`.+ .+ Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.+ default: True+ manual: False+ flag containers description: You can disable the use of the `containers` package using `-f-containers`.@@ -84,7 +92,7 @@ description: You can disable the use of the `transformers` package using `-f-transformers`. .- Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sa ndboxes for expert users.+ Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users. default: True manual: True @@ -126,7 +134,11 @@ build-depends: binary if flag(bytestring)- build-depends: bytestring >= 0.9 && < 1+ if flag(bytestring-builder)+ build-depends: bytestring >= 0.9 && < 0.10.4,+ bytestring-builder >= 0.10.4 && < 1+ else+ build-depends: bytestring >= 0.10.4 && < 1 if flag(containers) build-depends: containers >= 0.3 && < 0.6
src-ghc7/Data/List/NonEmpty.hs view
@@ -414,7 +414,7 @@ -- | @'cycle' xs@ returns the infinite repetition of @xs@: ----- > cycle [1,2,3] = 1 :| [2,3,1,2,3,...]+-- > cycle (1 :| [2,3]) = 1 :| [2,3,1,2,3,...] cycle :: NonEmpty a -> NonEmpty a cycle = fromList . List.cycle . toList {-# INLINE cycle #-}
src-ghc7/Data/Semigroup.hs view
@@ -8,7 +8,7 @@ #if __GLASGOW_HASKELL__ >= 702 #define LANGUAGE_DefaultSignatures {-# LANGUAGE DefaultSignatures #-}-#if defined(MIN_VERSION_hashable) || __GLASGOW_HASKELL__ >= 708+#if (defined(MIN_VERSION_hashable)) || __GLASGOW_HASKELL__ >= 708 {-# LANGUAGE Trustworthy #-} #else {-# LANGUAGE Safe #-}@@ -127,29 +127,31 @@ #endif #ifdef MIN_VERSION_binary+# if !(MIN_VERSION_binary(0,8,3)) import qualified Data.Binary.Builder as Builder+# endif #endif #ifdef MIN_VERSION_bytestring import Data.ByteString as Strict import Data.ByteString.Lazy as Lazy -# if MIN_VERSION_bytestring(0,10,2)+# if (MIN_VERSION_bytestring(0,10,2)) || defined(MIN_VERSION_bytestring_builder) import qualified Data.ByteString.Builder as ByteString # elif MIN_VERSION_bytestring(0,10,0) import qualified Data.ByteString.Lazy.Builder as ByteString # endif -# if MIN_VERSION_bytestring(0,10,4)+# if (MIN_VERSION_bytestring(0,10,4)) || defined(MIN_VERSION_bytestring_builder) import Data.ByteString.Short # endif #endif -#if MIN_VERSION_base(4,8,0) || defined(MIN_VERSION_transformers)+#if (MIN_VERSION_base(4,8,0)) || defined(MIN_VERSION_transformers) import Data.Functor.Identity #endif -#if MIN_VERSION_base(4,7,0) || defined(MIN_VERSION_tagged)+#if (MIN_VERSION_base(4,7,0)) || defined(MIN_VERSION_tagged) import Data.Proxy #endif @@ -796,8 +798,10 @@ -- (==)/XNOR on Bool forms a 'Semigroup', but has no good name #ifdef MIN_VERSION_binary+# if !(MIN_VERSION_binary(0,8,3)) instance Semigroup Builder.Builder where (<>) = mappend+# endif #endif #ifdef MIN_VERSION_bytestring@@ -807,12 +811,12 @@ instance Semigroup Lazy.ByteString where (<>) = mappend -# if MIN_VERSION_bytestring(0,10,0)+# if (MIN_VERSION_bytestring(0,10,0)) || defined(MIN_VERSION_bytestring_builder) instance Semigroup ByteString.Builder where (<>) = mappend # endif -# if MIN_VERSION_bytestring(0,10,4)+# if (MIN_VERSION_bytestring(0,10,4)) || defined(MIN_VERSION_bytestring_builder) instance Semigroup ShortByteString where (<>) = mappend # endif@@ -1020,7 +1024,7 @@ stimes = stimesIdempotentMonoid #endif -#if MIN_VERSION_base(4,8,0) || defined(MIN_VERSION_transformers)+#if (MIN_VERSION_base(4,8,0)) || defined(MIN_VERSION_transformers) instance Semigroup a => Semigroup (Identity a) where # ifdef USE_COERCE (<>) = coerce ((<>) :: a -> a -> a)@@ -1030,7 +1034,7 @@ stimes n (Identity a) = Identity (stimes n a) #endif -#if MIN_VERSION_base(4,7,0) || defined(MIN_VERSION_tagged)+#if (MIN_VERSION_base(4,7,0)) || defined(MIN_VERSION_tagged) instance Semigroup (Proxy s) where _ <> _ = Proxy sconcat _ = Proxy