contravariant-1.5.5: Contravariant functors

Copyright | (c) Edward Kmett 2010
License | BSD3
Maintainer | ekmett@gmail.com
Stability | experimental
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Data.Functor.Contravariant.Compose

Description

Composition of contravariant functors.

Synopsis

- newtype Compose (f :: Type -> Type) (g :: Type -> Type) a = Compose {
  - getCompose :: f (g a)
  }
- newtype ComposeFC (f :: Type -> Type) (g :: Type -> Type) a = ComposeFC {
  - getComposeFC :: f (g a)
  }
- newtype ComposeCF (f :: Type -> Type) (g :: Type -> Type) a = ComposeCF {
  - getComposeCF :: f (g a)
  }

# Documentation

newtype Compose (f :: Type -> Type) (g :: Type -> Type) a Source #

Composition of two contravariant functors

Constructors

Compose |

Fields

- getCompose :: f (g a)

#### Instances

Instances details

(Contravariant f, Contravariant g) => Functor (Compose f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods fmap :: (a -> b) -> Compose f g a -> Compose f g b Source # (<$) :: a -> Compose f g b -> Compose f g a Source #

newtype ComposeFC (f :: Type -> Type) (g :: Type -> Type) a Source #

Composition of covariant and contravariant functors

Constructors

ComposeFC |

Fields

- getComposeFC :: f (g a)

#### Instances

Instances details

(Functor f, Contravariant g) => Contravariant (ComposeFC f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods contramap :: (a' -> a) -> ComposeFC f g a -> ComposeFC f g a' Source # (>$) :: b -> ComposeFC f g b -> ComposeFC f g a Source #
(Applicative f, Decidable g) => Decidable (ComposeFC f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods lose :: (a -> Void) -> ComposeFC f g a Source # choose :: (a -> Either b c) -> ComposeFC f g b -> ComposeFC f g c -> ComposeFC f g a Source #
(Applicative f, Divisible g) => Divisible (ComposeFC f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods divide :: (a -> (b, c)) -> ComposeFC f g b -> ComposeFC f g c -> ComposeFC f g a Source # conquer :: ComposeFC f g a Source #
(Functor f, Functor g) => Functor (ComposeFC f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods fmap :: (a -> b) -> ComposeFC f g a -> ComposeFC f g b Source # (<$) :: a -> ComposeFC f g b -> ComposeFC f g a Source #

newtype ComposeCF (f :: Type -> Type) (g :: Type -> Type) a Source #

Composition of contravariant and covariant functors

Constructors

ComposeCF |

Fields

- getComposeCF :: f (g a)

#### Instances

Instances details

(Contravariant f, Functor g) => Contravariant (ComposeCF f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods contramap :: (a' -> a) -> ComposeCF f g a -> ComposeCF f g a' Source # (>$) :: b -> ComposeCF f g b -> ComposeCF f g a Source #
(Divisible f, Applicative g) => Divisible (ComposeCF f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods divide :: (a -> (b, c)) -> ComposeCF f g b -> ComposeCF f g c -> ComposeCF f g a Source # conquer :: ComposeCF f g a Source #
(Functor f, Functor g) => Functor (ComposeCF f g) Source # |
Instance details Defined in Data.Functor.Contravariant.Compose Methods fmap :: (a -> b) -> ComposeCF f g a -> ComposeCF f g b Source # (<$) :: a -> ComposeCF f g b -> ComposeCF f g a Source #