hw-streams 0.0.0.9 → 0.0.0.10
raw patch · 2 files changed
+7/−2 lines, 2 filesdep ~QuickCheckdep ~hedgehogdep ~hspecPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: QuickCheck, hedgehog, hspec, primitive, semigroups
API changes (from Hackage documentation)
+ HaskellWorks.Data.Streams.Stream: foldMap :: Monoid a => (b -> a) -> Stream b -> a
Files
hw-streams.cabal view
@@ -1,7 +1,7 @@ cabal-version: 1.12 name: hw-streams-version: 0.0.0.9+version: 0.0.0.10 synopsis: Primitive functions and data types description: Primitive functions and data types. category: Data
src/HaskellWorks/Data/Streams/Stream.hs view
@@ -6,9 +6,10 @@ module HaskellWorks.Data.Streams.Stream where import Data.Bool+import Data.Monoid ((<>)) import HaskellWorks.Data.Streams.Size -import Prelude hiding (drop, zipWith)+import Prelude hiding (drop, foldl, zipWith) data Stream a where Stream :: ()@@ -141,3 +142,7 @@ where step [] = Done step (b:bs) = Yield b bs {-# INLINE [1] fromList #-}++foldMap :: Monoid a => (b -> a) -> Stream b -> a+foldMap f = foldl (\a b -> a <> f b) mempty+{-# INLINE [1] foldMap #-}