{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}
module Configuration.Utils.Operators
( (%)
, (×)
, (<*<)
, (>*>)
, (<$<)
, (>$>)
) where
(%) ∷ (a → b) → a → b
% :: (a -> b) -> a -> b
(%) = (a -> b) -> a -> b
forall a b. (a -> b) -> a -> b
($)
infixr 5 %
{-# INLINE (%) #-}
(×) ∷ (a → b) → a → b
× :: (a -> b) -> a -> b
(×) = (a -> b) -> a -> b
forall a b. (a -> b) -> a -> b
($)
infixr 5 ×
{-# INLINE (×) #-}
{-# DEPRECATED (×) "use '%' instead" #-}
(<*<) ∷ Applicative f ⇒ f (b → c) → f (a → b) → f (a → c)
<*< :: f (b -> c) -> f (a -> b) -> f (a -> c)
(<*<) f (b -> c)
a f (a -> b)
b = ((b -> c) -> (a -> b) -> a -> c
forall b c a. (b -> c) -> (a -> b) -> a -> c
(.) ((b -> c) -> (a -> b) -> a -> c)
-> f (b -> c) -> f ((a -> b) -> a -> c)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> f (b -> c)
a) f ((a -> b) -> a -> c) -> f (a -> b) -> f (a -> c)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> f (a -> b)
b
infixr 4 <*<
{-# INLINE (<*<) #-}
(>*>) ∷ Applicative f ⇒ f (a → b) → f (b → c) → f (a → c)
>*> :: f (a -> b) -> f (b -> c) -> f (a -> c)
(>*>) = (f (b -> c) -> f (a -> b) -> f (a -> c))
-> f (a -> b) -> f (b -> c) -> f (a -> c)
forall a b c. (a -> b -> c) -> b -> a -> c
flip f (b -> c) -> f (a -> b) -> f (a -> c)
forall (f :: * -> *) b c a.
Applicative f =>
f (b -> c) -> f (a -> b) -> f (a -> c)
(<*<)
infixr 4 >*>
{-# INLINE (>*>) #-}
(<$<) ∷ Functor f ⇒ (b → c) → f (a → b) → f (a → c)
<$< :: (b -> c) -> f (a -> b) -> f (a -> c)
(<$<) b -> c
a f (a -> b)
b = (b -> c
a (b -> c) -> (a -> b) -> a -> c
forall b c a. (b -> c) -> (a -> b) -> a -> c
.) ((a -> b) -> a -> c) -> f (a -> b) -> f (a -> c)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> f (a -> b)
b
infixr 4 <$<
{-# INLINE (<$<) #-}
(>$>) ∷ Functor f ⇒ f (a → b) → (b → c) → f (a → c)
>$> :: f (a -> b) -> (b -> c) -> f (a -> c)
(>$>) = ((b -> c) -> f (a -> b) -> f (a -> c))
-> f (a -> b) -> (b -> c) -> f (a -> c)
forall a b c. (a -> b -> c) -> b -> a -> c
flip (b -> c) -> f (a -> b) -> f (a -> c)
forall (f :: * -> *) b c a.
Functor f =>
(b -> c) -> f (a -> b) -> f (a -> c)
(<$<)
infixr 4 >$>
{-# INLINE (>$>) #-}