map-reduce-folds 0.1.0.0 → 0.1.0.1
raw patch · 4 files changed
+22/−16 lines, 4 filesdep ~containersdep ~hashabledep ~hedgehogPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: containers, hashable, hedgehog, profunctors
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−1
- map-reduce-folds.cabal +6/−5
- src/Control/MapReduce.hs +8/−6
- src/Control/MapReduce/Core.hs +4/−4
ChangeLog.md view
@@ -1,3 +1,6 @@-version 0.1.0.0+* version 0.1.0.1+* Lowered containers lower bound to 0.5.0.0++* version 0.1.0.0 initial Hackage version
map-reduce-folds.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: map-reduce-folds-version: 0.1.0.0+version: 0.1.0.1 build-type: Simple synopsis: foldl wrappers for map-reduce description: map-reduce-folds simplifies the building of folds to do map-reduce style computations on collections. It breaks the map/reduce into an unpacking step where items may be filtered, transformed or "melted" (made into several new items), an assign step where the unpacked items are assigned keys, a grouping step where the assigned items are grouped by key and then a reduce step which is applied to each grouped subset. Tools are provided to simplify building the individual steps and then "engines" are provided for combining them into efficient folds returning an assortment of containers. The various pieces are replicated for effectful (monadic) steps producing effectful (monadic) folds.@@ -14,6 +14,7 @@ category: Control extra-source-files: ChangeLog.md tested-with: GHC ==8.6.4 || ==8.6.2+ flag dump-core description: Dump HTML for the core generated by GHC during compilation default: False@@ -25,9 +26,9 @@ common deps build-depends: base >= 4.12.0 && < 4.13,- containers >= 0.6.0 && < 0.7,+ containers >= 0.5.0 && < 0.7, foldl >= 1.4.5 && < 1.5,- profunctors >= 5.3 && < 5.4,+ profunctors >= 5.3 && < 5.5, text >= 1.2.3 && < 1.3, unordered-containers >= 0.2.10 && < 0.3 @@ -49,7 +50,7 @@ build-depends: discrimination >= 0.3 && < 0.4,- hashable >= 1.2.7 && < 1.3,+ hashable >= 1.2.7 && < 1.4, hashtables >= 1.2.0.0 && < 1.3.0.0, vector >= 0.12.0 && < 0.13, parallel >= 3.2.2 && < 3.3,@@ -69,7 +70,7 @@ ghc-options: build-depends: base- , hedgehog >= 0.6.0 && < 0.7+ , hedgehog >= 0.6.0 && < 1.1 , map-reduce-folds , containers , foldl
src/Control/MapReduce.hs view
@@ -22,20 +22,22 @@ E.g., reduce could itself be a map-reduce on the grouped data. Since these are folds, we can share work by using the Applicative instance of MapStep (just the Applicative instance of Control.Foldl.Fold) and we will loop over the data only once.-The Reduce type is also Applicative so there could be work sharing there as well:-e.g., if your `reduce :: (k -> d -> e)` has the form `reduce k :: FL.Fold d e`+The Reduce type is also Applicative so there could be work sharing there as well, especially if you+specify your reduce as a Fold.+e.g., if your @reduce :: (k -> h c -> d)@ has the form @reduce :: k -> FL.Fold c d@ -These types are meant to simplify the building of "Engines" which combine them into a single efficient fold from a container of x to some container of the result. The Engine amounts to a choice of grouping algorithm (usually just uses Data.Map or Data.HashMap) and a type in which to do the calculations and return the result. These are assembled into a Fold.+We combine these steps with an Engine, resulting in a fold from a container of @x@ to some container of @d@.+The Engine amounts to a choice of grouping algorithm (usually using @Data.Map@ or @Data.HashMap@) and a choice of computation and result container type.+The result container type is used for the intermediate steps as well. The goal is to make assembling a large family of common map/reduce patterns in a straightforward way. At some level of complication, you may as well write them by hand. An in-between case would be writing the unpack function as a complex hand written filter -} module Control.MapReduce (- -- * Core types for specifying map/reduce folds+ -- * Core Types module Control.MapReduce.Core- -- * default choices for grouping algorithms and intermediate types and helper functions- -- for common cases.+ -- * Default choices and helper functions , module Control.MapReduce.Simple ) where
src/Control/MapReduce/Core.hs view
@@ -51,17 +51,17 @@ module Control.MapReduce.Core ( -- * Basic Types for map reduce- -- ** non-monadic+ -- ** Non-Monadic Unpack(..) , Assign(..) , Reduce(..) - -- ** monadic+ -- ** Monadic , UnpackM(..) , AssignM(..) , ReduceM(..) - -- ** functions to generalize non-monadic to monadic+ -- ** Non-Monadic -> Monadic , generalizeUnpack , generalizeAssign , generalizeReduce@@ -71,7 +71,7 @@ , functionToFoldM , postMapM - -- * re-exports+ -- * Re-Exports , Fold , FoldM , fold