Data.Functor.Contravariant.Compose

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 #

Composition of two contravariant functors

Constructors

Compose |
Fields getCompose :: f (g a)

#### Instances

Instances details

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

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

Composition of covariant and contravariant functors

Constructors

ComposeFC |
Fields getComposeFC :: f (g a)

#### Instances

Instances details

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

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

Composition of contravariant and covariant functors

Constructors

ComposeCF |
Fields getComposeCF :: f (g a)

#### Instances

Instances details

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