composition-prelude 1.1.0.0 → 1.1.0.1
raw patch · 2 files changed
+14/−8 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Control.Composition: thread :: [a -> a] -> a -> a
+ Control.Composition: zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
Files
- composition-prelude.cabal +2/−2
- src/Control/Composition.hs +12/−6
composition-prelude.cabal view
@@ -1,5 +1,5 @@ name: composition-prelude-version: 1.1.0.0+version: 1.1.0.1 synopsis: Higher-order function combinators description: Replacement for `composition` or `composition-exta`, exporting everything in one sane module. homepage: https://github.com/vmchale/composition-prelude#readme@@ -29,7 +29,7 @@ if flag(development) ghc-options: -Werror if impl(ghc >= 8.0)- ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates -Wmissing-import-lists+ ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates ghc-options: -Wall source-repository head
src/Control/Composition.hs view
@@ -14,6 +14,8 @@ , (-.****) -- * Fancy function application , (-$)+ -- * Composition with lists of functions+ , thread -- * Tuple helpers , both -- * Functor helpers@@ -31,6 +33,7 @@ , void , when , unless+ , zipWithM -- * Reexports from base , (&) , fix@@ -39,12 +42,7 @@ ) where import Control.Arrow (first, second, (&&&), (***))-#if __GLASGOW_HASKELL__ <= 783-import Control.Monad (ap, join, unless, void, when, (<=<), (>=>))-#else-import Control.Monad (ap, join, unless, void, when, (<=<), (=<<),- (>=>))-#endif+import Control.Monad #if __GLASGOW_HASKELL__ > 784 import Data.Function (fix, on, (&)) #else@@ -128,3 +126,11 @@ (<&>) :: Functor f => f a -> (a -> b) -> f b x <&> f = fmap f x #endif++-- (<$$)++thread :: [a -> a] -> a -> a+thread = foldr (.) id++-- setZip :: [ASetter a a b b] -> [b] -> a -> a+-- setZip ls ts = thread (zipWith set ls ts)