transformers- Concrete functor and monad transformers

Safe HaskellSafe-Inferred



Composition of functors.



newtype Compose f g a Source

Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.


Compose (f (g a)) 


(Functor f, Functor g) => Functor (Compose f g) 
(Applicative f, Applicative g) => Applicative (Compose f g) 
(Foldable f, Foldable g) => Foldable (Compose f g) 
(Traversable f, Traversable g) => Traversable (Compose f g) 
(Alternative f, Applicative g) => Alternative (Compose f g) 
(Functor f, Show1 f, Show1 g) => Show1 (Compose f g) 
(Functor f, Read1 f, Read1 g) => Read1 (Compose f g) 
(Functor f, Ord1 f, Ord1 g) => Ord1 (Compose f g) 
(Functor f, Eq1 f, Eq1 g) => Eq1 (Compose f g) 
(Functor f, Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) 
(Functor f, Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a) 
(Functor f, Read1 f, Read1 g, Read a) => Read (Compose f g a) 
(Functor f, Show1 f, Show1 g, Show a) => Show (Compose f g a) 

getCompose :: Compose f g a -> f (g a)Source

Inverse of Compose.