packages feed

composition-prelude 0.1.1.4 → 1.0.0.0

raw patch · 3 files changed

+40/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Composition: (-.****) :: (e -> f) -> (a -> b -> c -> d -> f -> g) -> a -> b -> c -> d -> e -> g
+ Control.Composition: (.****) :: (f -> g) -> (a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> g
+ Control.Composition: (<&>) :: Functor f => f a -> (a -> b) -> f b
+ Control.Composition: first :: Arrow a => forall b c d. () => a b c -> a (b, d) (c, d)
+ Control.Composition: second :: Arrow a => forall b c d. () => a b c -> a (d, b) (d, c)
- Control.Composition: infixr 8 -.***
+ Control.Composition: infixr 8 -.****

Files

composition-prelude.cabal view
@@ -1,5 +1,5 @@ name:                composition-prelude-version:             0.1.1.4+version:             1.0.0.0 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
@@ -5,18 +5,24 @@       (.*)     , (.**)     , (.***)+    , (.****)     -- * Precomposition     , (-.)     , (-.*)     , (-.**)     , (-.***)+    , (-.****)     -- * Fancy function application     , (-$)     -- * Tuple helpers     , both+    -- * Functor helpers+    , (<&>)     -- * Reexports from Control.Arrow     , (&&&)     , (***)+    , first+    , second     -- * Reexports from Control.Monad     , join     , (=<<)@@ -29,7 +35,7 @@     , ap     ) where -import           Control.Arrow ((&&&), (***))+import           Control.Arrow (first, second, (&&&), (***)) #if __GLASGOW_HASKELL__ <= 783 import           Control.Monad (ap, join, (<=<), (>=>)) #else@@ -40,13 +46,20 @@ #else import           Data.Function (fix, on) #endif+#if defined(MIN_VERSION_lens)+#if MIN_VERSION_lens(3,0)+import           Control.Lens  ((<&>))+#endif+#endif  infixr 8 .* infixr 8 .** infixr 8 .***+infixr 8 .**** infixr 8 -.* infixr 8 -.** infixr 8 -.***+infixr 8 -.**** infixl 8 -$ #if __GLASGOW_HASKELL__ <= 784 infixl 1 &@@ -54,10 +67,18 @@ (&) :: a -> (a -> b) -> b (&) x f = f x #endif+#if defined(MIN_VERSION_lens)+#if !MIN_VERSION_lens(3,0)+infixl 1 <&>+#endif+#else+infixl 1 <&>+#endif  both :: (a -> b) -> (a, a) -> (b, b) both = join (***) +-- | Backwards function (-$) :: (a -> b -> c) -> b -> a -> c (-$) f x y = f y x @@ -74,6 +95,9 @@ (.***) :: (e -> f) -> (a -> b -> c -> d -> e) -> a -> b -> c -> d -> f (.***) f g w x y z = f (g w x y z) +(.****) :: (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)+ -- | The Oedipus combinator (-.*) :: (b -> c) -> (a -> c -> d) -> a -> b -> d (-.*) f g x y = g x (f y)@@ -84,6 +108,19 @@ (-.***) :: (d -> e) -> (a -> b -> c -> e -> f) -> a -> b -> c -> d -> f (-.***) f g w x y z = g w 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)+ -- | Backwards function composition (-.) :: (a -> b) -> (b -> c) -> a -> c (-.) f g x = g (f x)++#if defined(MIN_VERSION_lens)+#if !MIN_VERSION_lens(3,0)+(<&>) :: Functor f => f a -> (a -> b) -> f b+x <&> f = fmap f x+#endif+#else+(<&>) :: Functor f => f a -> (a -> b) -> f b+x <&> f = fmap f x+#endif
stack.yaml view
@@ -1,4 +1,4 @@-resolver: lts-9.10+resolver: lts-10.3 packages: - '.' extra-deps: []