contravariant-1.5.5: Contravariant functors
Copyright(c) Edward Kmett 2010
LicenseBSD3
Maintainerekmett@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Contravariant.Compose

Description

Composition of contravariant functors.

Synopsis

Documentation

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

Composition of two contravariant functors

Constructors

Compose 

Fields

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 #

(<$) :: a -> Compose f g b -> Compose f g a #

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

Composition of covariant and contravariant functors

Constructors

ComposeFC 

Fields

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' #

(>$) :: b -> ComposeFC f g b -> ComposeFC f g a #

(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 #

(<$) :: a -> ComposeFC f g b -> ComposeFC f g a #

(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 #

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

Composition of contravariant and covariant functors

Constructors

ComposeCF 

Fields

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' #

(>$) :: b -> ComposeCF f g b -> ComposeCF f g a #

(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 #

(<$) :: a -> ComposeCF f g b -> ComposeCF f g a #

(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 #