composition-prelude 1.3.0.0 → 1.3.0.1
raw patch · 2 files changed
+9/−4 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Control.Composition: bisequence :: (Traversable t, Monad m) => t (a -> b -> m c) -> a -> b -> t (m c)
Files
composition-prelude.cabal view
@@ -1,5 +1,5 @@ name: composition-prelude-version: 1.3.0.0+version: 1.3.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
src/Control/Composition.hs view
@@ -14,6 +14,8 @@ , (-.****) -- * Fancy function application , (-$)+ -- * Monadic helpers+ , bisequence -- * Monadic actions , axe , biaxe@@ -34,7 +36,7 @@ import Control.Arrow ((***)) import Control.Monad import Data.Bool (bool)-#if __GLASGOW_HASKELL__ > 784+#if __GLASGOW_HASKELL__ > 710 import Data.Function (fix, on, (&)) #else import Data.Function (fix, on)@@ -54,7 +56,7 @@ infixr 8 -.*** infixr 8 -.**** infixl 8 -$-#if __GLASGOW_HASKELL__ <= 784+#if __GLASGOW_HASKELL__ <= 710 infixl 1 & (&) :: a -> (a -> b) -> b@@ -71,8 +73,11 @@ axe :: (Traversable t, Monad m) => t (a -> m ()) -> a -> m () axe = sequence_ .* sequence +bisequence :: (Traversable t, Monad m) => t (a -> b -> m c) -> a -> b -> t (m c)+bisequence = sequence .* sequence+ biaxe :: (Traversable t, Monad m) => t (a -> b -> m ()) -> a -> b -> m ()-biaxe = sequence_ .** sequence .* sequence+biaxe = sequence_ .** bisequence both :: (a -> b) -> (a, a) -> (b, b) both = join (***)