semigroupoids 6.0.1 → 6.0.2
raw patch · 5 files changed
+37/−23 lines, 5 filesdep −distributivedep ~transformers-compat
Dependencies removed: distributive
Dependency ranges changed: transformers-compat
Files
- CHANGELOG.markdown +5/−0
- semigroupoids.cabal +11/−21
- src/Data/Functor/Bind/Class.hs +19/−0
- src/Data/Semigroup/Foldable.hs +1/−1
- src/Data/Semigroup/Traversable.hs +1/−1
CHANGELOG.markdown view
@@ -1,3 +1,8 @@+6.0.2 [2026.01.10]+------------------+* Add `Apply` and `Bind` instances for strict and lazy `ST`.+* Remove unused `distributive` dependency.+ 6.0.1 [2024.05.04] ------------------ * Fix a build error when compiling with `-f-contravariant`.
semigroupoids.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.24 name: semigroupoids category: Control, Comonads-version: 6.0.1+version: 6.0.2 license: BSD2 license-file: LICENSE author: Edward A. Kmett@@ -17,9 +17,13 @@ , GHC == 8.8.4 , GHC == 8.10.7 , GHC == 9.0.2- , GHC == 9.2.7- , GHC == 9.4.4- , GHC == 9.6.1+ , GHC == 9.2.8+ , GHC == 9.4.8+ , GHC == 9.6.7+ , GHC == 9.8.4+ , GHC == 9.10.3+ , GHC == 9.12.2+ , GHC == 9.14.1 build-type: Simple synopsis: Semigroupoids: Category sans id extra-source-files:@@ -64,7 +68,7 @@ source-repository head type: git- location: git://github.com/ekmett/semigroupoids.git+ location: https://github.com/ekmett/semigroupoids.git flag containers description:@@ -85,17 +89,6 @@ default: True manual: True -flag distributive- description:- You can disable the use of the `distributive` package using `-f-distributive`.- .- Disabling this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.- .- If disabled we will not supply instances of `Distributive`- .- default: True- manual: True- flag comonad description: You can disable the use of the `comonad` package using `-f-comonad`.@@ -143,14 +136,11 @@ build-depends: containers >= 0.6.7 if flag(containers)- build-depends: containers >= 0.5.7.1 && < 0.8+ build-depends: containers >= 0.5.7.1 && < 0.9 if flag(contravariant) build-depends: contravariant >= 1.5.3 && < 2 - if flag(distributive)- build-depends: distributive >= 0.5.2 && < 1- if flag(comonad) build-depends: comonad >= 5.0.8 && < 6 @@ -158,7 +148,7 @@ build-depends: tagged >= 0.8.7 && < 1 if flag(unordered-containers)- build-depends: hashable >= 1.2.7.0 && < 1.5,+ build-depends: hashable >= 1.2.7.0 && < 1.6, unordered-containers >= 0.2.8.0 && < 0.3 hs-source-dirs: src
src/Data/Functor/Bind/Class.hs view
@@ -44,6 +44,8 @@ import Control.Arrow import Control.Category import Control.Monad (ap)+import Control.Monad.ST+import qualified Control.Monad.ST.Lazy as Lazy import Control.Monad.Trans.Cont import Control.Monad.Trans.Except import Control.Monad.Trans.Identity@@ -342,6 +344,17 @@ Lazy.WriterT f <.> Lazy.WriterT a = Lazy.WriterT $ flap <$> f <.> a where flap ~(x,m) ~(y,n) = (x y, m <> n) +instance Apply (ST s) where+ (<.>) = (<*>)+ (<.) = (<*)+ (.>) = (*>)++instance Apply (Lazy.ST s) where+ (<.>) = (<*>)+ (<.) = (<*)+ (.>) = (*>)++ #if MIN_VERSION_transformers(0,5,6) -- | @since 5.3.6 instance (Bind m) => Apply (CPS.WriterT w m) where@@ -572,6 +585,12 @@ (>>-) = (>>=) instance Bind IO where+ (>>-) = (>>=)++instance Bind (ST s) where+ (>>-) = (>>=)++instance Bind (Lazy.ST s) where (>>-) = (>>=) instance Bind Maybe where
src/Data/Semigroup/Foldable.hs view
@@ -107,7 +107,7 @@ -- | Generic 'fold1'. Caveats: -- -- 1. Will not compile if @t@ is an empty constructor.--- 2. Will not compile if @t@ has some fields that don't mention @a@, for exmaple @data Bar a = MkBar a Int@+-- 2. Will not compile if @t@ has some fields that don't mention @a@, for example @data Bar a = MkBar a Int@ -- -- @since 5.3.8 gfold1 :: (Foldable1 (Rep1 t), Generic1 t, Semigroup m) => t m -> m
src/Data/Semigroup/Traversable.hs view
@@ -37,7 +37,7 @@ -- | Generic 'traverse1'. Caveats: -- -- 1. Will not compile if @t@ is an empty constructor.--- 2. Will not compile if @t@ has some fields that don't mention @a@, for exmaple @data Bar a = MkBar a Int@+-- 2. Will not compile if @t@ has some fields that don't mention @a@, for example @data Bar a = MkBar a Int@ -- -- @since 5.3.8 gtraverse1 ::