packages feed

composition-prelude 2.0.2.1 → 2.0.3.0

raw patch · 3 files changed

+44/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Composition: (.@) :: (b -> c) -> (a -> c -> d) -> a -> b -> d
+ Control.Composition: (.@@) :: (c -> d) -> (a -> b -> d -> e) -> a -> b -> c -> e
+ Control.Composition: (.@@@) :: (c -> d) -> (a -> b -> d -> e) -> a -> b -> c -> e
+ Control.Composition: (.@@@@) :: (e -> f) -> (a -> b -> c -> d -> f -> g) -> a -> b -> c -> d -> e -> g

Files

CHANGELOG.md view
@@ -1,12 +1,21 @@ # composition-prelude +# 2.0.3.0++  * Add `(.@)`, `(.@@)`, `(.@@@)`, `(.@@@@)` operators+  * Improved documentation++# 2.0.2.2+  +  * Polish documentation+ # 2.0.2.1    * Polish documentation  # 2.0.2.0 -  * Add `$.`+  * Add `.$`  # 2.0.1.0 
composition-prelude.cabal view
@@ -1,15 +1,15 @@ cabal-version: 1.18 name: composition-prelude-version: 2.0.2.1+version: 2.0.3.0 license: BSD3 license-file: LICENSE-copyright: Copyright: (c) 2017-2018 Vanessa McHale+copyright: Copyright: (c) 2017-2019 Vanessa McHale maintainer: vamchale@gmail.com author: Vanessa McHale bug-reports: https://hub.darcs.net/vmchale/composition-prelude/issues synopsis: Higher-order function combinators description:-    Replacement for `composition` or `composition-extra`, exporting everything in one module.+    Replacement for [composition](hackage.haskell.org/package/composition) or [composition-extra](hackage.haskell.org/package/composition-extra), exporting everything in one module. category: Control, Data build-type: Simple extra-doc-files: README.md
src/Control/Composition.hs view
@@ -5,6 +5,10 @@     , (.***)     , (.****)     -- * Precomposition+    , (.@)+    , (.@@)+    , (.@@@)+    , (.@@@@)     , (-.)     , (-.*)     , (-.**)@@ -66,6 +70,10 @@ infixr 8 -.** infixr 8 -.*** infixr 8 -.****+infixr 8 .@+infixr 8 .@@+infixr 8 .@@@+infixr 8 .@@@@ infixl 3 .$ infixl 8 -$ infixl 8 ~@~@@ -109,7 +117,7 @@ (.$) :: Monad m => m (m a) -> m a (.$) = join --- | Backwards function application+-- | Backwards function application. This is an infix synonym for 'flip' (-$) :: (a -> b -> c) -> b -> a -> c (-$) = flip @@ -126,6 +134,7 @@ (.***) :: (e -> f) -> (a -> b -> c -> d -> e) -> a -> b -> c -> d -> f (.***) f g = \w x y z -> f (g w x y z) +-- | @since 1.0.0.0 (.****) :: (f -> g) -> (a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> g (.****) f g = \v w x y z -> f (g v w x y z) @@ -179,18 +188,38 @@ (-.*) :: (b -> c) -> (a -> c -> d) -> a -> b -> d (-.*) f g = \x y -> g x (f y) +-- | @since 2.0.3.0+(.@) :: (b -> c) -> (a -> c -> d) -> a -> b -> d+(.@) f g = \x y -> g x (f y)+ (-.**) :: (c -> d) -> (a -> b -> d -> e) -> a -> b -> c -> e (-.**) f g = \x y z -> g x y (f z)+{-# DEPRECATED (-.**) "Use .@@ instead" #-} +-- | @since 2.0.3.0+(.@@) :: (c -> d) -> (a -> b -> d -> e) -> a -> b -> c -> e+(.@@) f g = \x y z -> g x y (f z)+ (-.***) :: (d -> e) -> (a -> b -> c -> e -> f) -> a -> b -> c -> d -> f (-.***) f g = \w x y z -> g w x y (f z)+{-# DEPRECATED (-.***) "Use .@@@ instead" #-} +-- | @since 2.0.3.0+(.@@@) :: (c -> d) -> (a -> b -> d -> e) -> a -> b -> c -> e+(.@@@) f g = \x y z -> g x y (f z)+ (-.****) :: (e -> f) -> (a -> b -> c -> d -> f -> g) -> a -> b -> c -> d -> e -> g (-.****) f g = \v w x y z -> g v w x y (f z)+{-# DEPRECATED (-.****) "Use .@@@@ instead" #-} +-- | @since 2.0.3.0+(.@@@@) :: (e -> f) -> (a -> b -> c -> d -> f -> g) -> a -> b -> c -> d -> e -> g+(.@@@@) f g = \v w x y z -> g v w x y (f z)+ -- | Backwards function composition. This is a specialization of '<&>'. (-.) :: (a -> b) -> (b -> c) -> a -> c (-.) = (<&>)+{-# DEPRECATED (-.) "Use <&> instead" #-}  {-# RULES     "thread" forall f g.   thread [f, g]    = f . g;@@ -228,7 +257,7 @@  -- @since 1.5.3.0 betweenM :: Monad m => (c -> m d) -> (a -> m b) -> (b -> m c) -> a -> m d-betweenM f g = \h -> f <=< h <=< g+betweenM f g = (f <=<) . (<=< g)  -- @since 1.5.3.0 (~@~) :: (c -> d) -> (a -> b) -> (b -> c) -> a -> d