-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Collection of functor utilities, providing handy operators, like generalization of (.). -- -- Collection of functor utilities, providing handy operators, like -- generalization of (.). @package functor-utils @version 1.17.2 module Data.Functor.Utils type family Applicatives lst :: Constraint type family Functors lst :: Constraint fmap0 :: (a -> b) -> a -> b fmap1 :: Functor f => (a -> b) -> f a -> f b fmap2 :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b) fmap3 :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b)) fmap4 :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) fmap5 :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) (.) :: Functor f1 => (a -> b) -> f1 a -> f1 b infixr 9 . (.:) :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b) infixr 8 .: (.:.) :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b)) infixr 8 .:. (.::) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixr 8 .:: (.::.) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixr 8 .::. (∘) :: Functor f1 => (a -> b) -> f1 a -> f1 b infixr 9 ∘ (∘∘) :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b) infixr 8 ∘∘ (∘∘∘) :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b)) infixr 8 ∘∘∘ (∘∘∘∘) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixr 8 ∘∘∘∘ (∘∘∘∘∘) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixr 8 ∘∘∘∘∘ (<<$>>) :: Functors '[f1, f2] => (a -> b) -> f2 (f1 a) -> f2 (f1 b) infixl 4 <<$>> (<<<$>>>) :: Functors '[f1, f2, f3] => (a -> b) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b)) infixl 4 <<<$>>> (<<<<$>>>>) :: Functors '[f1, f2, f3, f4] => (a -> b) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixl 4 <<<<$>>>> (<<<<<$>>>>>) :: Functors '[f1, f2, f3, f4, f5] => (a -> b) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixl 4 <<<<<$>>>>> (<<*>>) :: Applicatives '[f1, f2] => f2 (f1 (a -> b)) -> f2 (f1 a) -> f2 (f1 b) infixl 4 <<*>> (<<<*>>>) :: Applicatives '[f1, f2, f3] => f3 (f2 (f1 (a -> b))) -> f3 (f2 (f1 a)) -> f3 (f2 (f1 b)) infixl 4 <<<*>>> (<<<<*>>>>) :: Applicatives '[f1, f2, f3, f4] => f4 (f3 (f2 (f1 (a -> b)))) -> f4 (f3 (f2 (f1 a))) -> f4 (f3 (f2 (f1 b))) infixl 4 <<<<*>>>> (<<<<<*>>>>>) :: Applicatives '[f1, f2, f3, f4, f5] => f5 (f4 (f3 (f2 (f1 (a -> b))))) -> f5 (f4 (f3 (f2 (f1 a)))) -> f5 (f4 (f3 (f2 (f1 b)))) infixl 4 <<<<<*>>>>> (|$) :: (a -> b) -> a -> (a, b) infixl 4 |$ ($|) :: (a -> b) -> a -> (b, a) infixl 4 $| (<|$>) :: Functor f => (a -> b) -> f a -> f (a, b) infixl 4 <|$> (<$|>) :: Functor f => (a -> b) -> f a -> f (b, a) infixl 4 <$|> composed :: Iso' (f (g a)) (Compose f g a) -- | following functions are usefull when operating on nested structures -- with lenses, for example | given function foo :: a -> m (n a) and a -- lens l :: Lens' x a, we can use | nested l foo to get signature of x -- -> m (n x) nested :: (Functor f1, Functor f2) => (f2 (Compose f3 g1 a1) -> f1 (Compose f4 g2 a2)) -> f2 (f3 (g1 a1)) -> f1 (f4 (g2 a2)) -- | Right-to-left composition of functors. The composition of applicative -- functors is always applicative, but the composition of monads is not -- always a monad. newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) :: forall k k1. () => k -> Type -> k1 -> k -> k1 -> Type Compose :: f (g a) -> Compose [getCompose] :: Compose -> f (g a) infixr 9 `Compose` infixr 9 `Compose`