Data.Functor.Compose

transformers-0.5.2.0: Concrete functor and monad transformers

Copyright | (c) Ross Paterson 2010
License | BSD-style (see the file LICENSE)
Maintainer | R.Paterson@city.ac.uk
Stability | experimental
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell98

Data.Functor.Compose

Description

Composition of functors.

Synopsis

- newtype Compose f g a = Compose {
  - getCompose :: f (g a)
  }

# Documentation

newtype Compose f g a infixr 9

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

Constructors

Compose infixr 9 |
Fields getCompose :: f (g a)

Instances

(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) |
Functor f => Generic1 (Compose * * f g) |
(Alternative f, Applicative g) => Alternative (Compose * * f g) |
(Show1 f, Show1 g) => Show1 (Compose * * f g) |
(Read1 f, Read1 g) => Read1 (Compose * * f g) |
(Ord1 f, Ord1 g) => Ord1 (Compose * * f g) |
(Eq1 f, Eq1 g) => Eq1 (Compose * * f g) |
(Eq1 f, Eq1 g, Eq a) => Eq (Compose * * f g a) |
(Data (f (g a)), Typeable (* -> *) f, Typeable (* -> *) g, Typeable * a) => Data (Compose * * f g a) |
(Ord1 f, Ord1 g, Ord a) => Ord (Compose * * f g a) |
(Read1 f, Read1 g, Read a) => Read (Compose * * f g a) |
(Show1 f, Show1 g, Show a) => Show (Compose * * f g a) |
Generic (Compose k k f g a) |
type Rep1 (Compose * * f g) |
type Rep (Compose k k1 f g a) |