packages feed

foldl 1.4.15 → 1.4.16

raw patch · 6 files changed

+33/−11 lines, 6 filesdep ~hashablePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: hashable

API changes (from Hackage documentation)

+ Control.Foldl: postmapM :: Monad m => (a -> m r) -> FoldM m x a -> FoldM m x r
- Control.Foldl: class Foldable (t :: TYPE LiftedRep -> Type)
+ Control.Foldl: class () => Foldable (t :: Type -> Type)
- Control.Foldl.ByteString: class Foldable (t :: TYPE LiftedRep -> Type)
+ Control.Foldl.ByteString: class () => Foldable (t :: Type -> Type)
- Control.Foldl.ByteString: data ByteString
+ Control.Foldl.ByteString: data () => ByteString
- Control.Foldl.ByteString: data Word8
+ Control.Foldl.ByteString: data () => Word8
- Control.Foldl.Text: class Foldable (t :: TYPE LiftedRep -> Type)
+ Control.Foldl.Text: class () => Foldable (t :: Type -> Type)
- Control.Foldl.Text: data Text
+ Control.Foldl.Text: data () => Text

Files

CHANGELOG.md view
@@ -1,3 +1,11 @@+1.4.16++- Add [`Control.Foldl.postmapM`]++1.4.15++- Add `Cosieve` and `Costrong` instances+ 1.4.14  - Add [`Control.Foldl.NonEmpty.nonEmpty`](https://github.com/Gabriella439/foldl/pull/186)
README.md view
@@ -136,7 +136,7 @@  ## Development Status -[![Build Status](https://travis-ci.org/Gabriella439/Haskell-Foldl-Library.png)](https://travis-ci.org/Gabriella439/Haskell-Foldl-Library)+[![Build Status](https://github.com/Gabriella439/foldl/actions/workflows/haskell.yml/badge.svg)](https://github.com/Gabriella439/foldl/actions/workflows/haskell.yml)  The `foldl` library is pretty stable at this point.  I don't expect there to be breaking changes to the API from this point forward unless people discover new
foldl.cabal view
@@ -1,5 +1,5 @@ Name: foldl-Version: 1.4.15+Version: 1.4.16 Cabal-Version: >=1.10 Build-Type: Simple License: BSD3@@ -25,13 +25,13 @@     HS-Source-Dirs: src     Build-Depends:         base         >= 4.11.0.0 && < 5   ,-        bytestring   >= 0.9.2.1  && < 0.12,+        bytestring   >= 0.9.2.1  && < 0.13,         random       >= 1.2      && < 1.3 ,-        primitive                   < 0.9 ,-        text         >= 0.11.2.0 && < 2.1 ,+        primitive                   < 0.10,+        text         >= 0.11.2.0 && < 2.2 ,         transformers >= 0.2.0.0  && < 0.7 ,         vector       >= 0.7      && < 0.14,-        containers   >= 0.5.0.0  && < 0.7 ,+        containers   >= 0.5.0.0  && < 0.8 ,         unordered-containers        < 0.3 ,         hashable                    < 1.5 ,         contravariant               < 1.6 ,
src/Control/Foldl.hs view
@@ -123,6 +123,7 @@     , _Fold1     , premap     , premapM+    , postmapM     , prefilter     , prefilterM     , predropWhile@@ -300,7 +301,7 @@     mempty = pure mempty     {-# INLINE mempty #-} -    mappend = liftA2 mappend+    mappend = (<>)     {-# INLINE mappend #-}  instance Num b => Num (Fold a b) where@@ -434,7 +435,7 @@     mempty = pure mempty     {-# INLINE mempty #-} -    mappend = liftA2 mappend+    mappend = (<>)     {-# INLINE mappend #-}  instance (Monad m, Num b) => Num (FoldM m a b) where@@ -1226,6 +1227,19 @@   where     step' x a = f a >>= step x {-# INLINABLE premapM #-}++{-| @(postmapM f folder)@ returns a new 'FoldM' where f is applied to the final value.++> postmapM return = id+>+> postmapM (f >=> g) = postmapM g . postmapM f++> postmapM k (pure r) = k r+-}+postmapM :: Monad m => (a -> m r) -> FoldM m x a -> FoldM m x r+postmapM f (FoldM step begin done) = FoldM step begin done'+  where done' x = done x >>= f+{-# INLINABLE postmapM #-}  {-| @(prefilter f folder)@ returns a new 'Fold' where the folder's input is used   only when the input satisfies a predicate f
src/Control/Foldl/NonEmpty.hs view
@@ -54,7 +54,7 @@     mempty = pure mempty     {-# INLINE mempty #-} -    mappend = liftA2 mappend+    mappend = (<>)     {-# INLINE mappend #-}  instance Num b => Num (Fold1 a b) where
src/Control/Scanl.hs view
@@ -149,7 +149,7 @@     mempty = pure mempty     {-# INLINE mempty #-} -    mappend = liftA2 mappend+    mappend = (<>)     {-# INLINE mappend #-}  instance Num b => Num (Scan a b) where@@ -299,7 +299,7 @@     mempty = pure mempty     {-# INLINE mempty #-} -    mappend = liftA2 mappend+    mappend = (<>)     {-# INLINE mappend #-}  instance (Monad m, Num b) => Num (ScanM m a b) where