{-# LINE 1 "src/Control/Composition.cpphs" #-}
# 1 "src/Control/Composition.cpphs"
# 1 "<built-in>"
# 1 "<command-line>"
# 12 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 17 "/usr/include/stdc-predef.h" 3 4
# 12 "<command-line>" 2
# 1 "./dist/build/autogen/cabal_macros.h" 1
# 13 "./dist/build/autogen/cabal_macros.h"
# 24 "./dist/build/autogen/cabal_macros.h"
# 35 "./dist/build/autogen/cabal_macros.h"
# 46 "./dist/build/autogen/cabal_macros.h"
# 57 "./dist/build/autogen/cabal_macros.h"
# 68 "./dist/build/autogen/cabal_macros.h"
# 79 "./dist/build/autogen/cabal_macros.h"
# 90 "./dist/build/autogen/cabal_macros.h"
# 101 "./dist/build/autogen/cabal_macros.h"
# 112 "./dist/build/autogen/cabal_macros.h"
# 123 "./dist/build/autogen/cabal_macros.h"
# 134 "./dist/build/autogen/cabal_macros.h"
# 145 "./dist/build/autogen/cabal_macros.h"
# 156 "./dist/build/autogen/cabal_macros.h"
# 167 "./dist/build/autogen/cabal_macros.h"
# 178 "./dist/build/autogen/cabal_macros.h"
# 12 "<command-line>" 2
# 1 "/usr/local/haskell/ghc-8.2.2-x86_64/lib/ghc-8.2.2/include/ghcversion.h" 1
# 12 "<command-line>" 2
# 1 "/tmp/ghc21239_0/ghc_2.h" 1
# 12 "<command-line>" 2
# 1 "src/Control/Composition.cpphs"
module Control.Composition
(
(.*)
, (.**)
, (.***)
, (.****)
, (-.)
, (-.*)
, (-.**)
, (-.***)
, (-.****)
, (-$)
, bisequence'
, axe
, biaxe
, thread
, both
, (<&>)
, (&)
, fix
, on
, ap
, bool
) where
import Control.Arrow ((***))
import Control.Monad
import Data.Bool (bool)
import Data.Function (fix, on, (&))
# 59 "src/Control/Composition.cpphs"
infixr 8 .*
infixr 8 .**
infixr 8 .***
infixr 8 .****
infixr 8 -.*
infixr 8 -.**
infixr 8 -.***
infixr 8 -.****
infixl 8 -$
# 85 "src/Control/Composition.cpphs"
infixl 1 <&>
# 97 "src/Control/Composition.cpphs"
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_ .** bisequence'
# 127 "src/Control/Composition.cpphs"
both :: (a -> b) -> (a, a) -> (b, b)
both = join (***)
(-$) :: (a -> b -> c) -> b -> a -> c
(-$) f x y = f y x
(.*) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(.*) f g x y = f (g x y)
(.**) :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
(.**) f g x y z = f (g x y z)
(.***) :: (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)
(-.*) :: (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)
(-.***) :: (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)
(-.) :: (a -> b) -> (b -> c) -> a -> c
(-.) f g x = g (f x)
# 177 "src/Control/Composition.cpphs"
(<&>) :: Functor f => f a -> (a -> b) -> f b
x <&> f = fmap f x
{-# RULES
"thread" forall f g. thread [f, g] = f . g
#-}
{-# RULES
"thread" forall f g h. thread [f, g, h] = f . g . h
#-}
{-# RULES
"thread/fmap" forall f fs. thread (f:fs) = f . thread fs
#-}
thread :: [a -> a] -> a -> a
thread = foldr (.) id
{-# INLINE [1] thread #-}