contravariant-1.4: Contravariant functors

Copyright (c) Edward Kmett 2010 BSD3 ekmett@gmail.com experimental portable Safe Haskell98

Data.Functor.Contravariant.Compose

Description

Composition of contravariant functors.

Synopsis

# Documentation

newtype Compose f g a #

Composition of two contravariant functors

Constructors

 Compose FieldsgetCompose :: f (g a)

Instances

 (Contravariant f, Contravariant g) => Functor (Compose f g) # Methodsfmap :: (a -> b) -> Compose f g a -> Compose f g b #(<$) :: a -> Compose f g b -> Compose f g a # newtype ComposeFC f g a # Composition of covariant and contravariant functors Constructors  ComposeFC FieldsgetComposeFC :: f (g a) Instances  (Functor f, Functor g) => Functor (ComposeFC f g) # Methodsfmap :: (a -> b) -> ComposeFC f g a -> ComposeFC f g b #(<$) :: a -> ComposeFC f g b -> ComposeFC f g a # (Functor f, Contravariant g) => Contravariant (ComposeFC f g) # Methodscontramap :: (a -> b) -> ComposeFC f g b -> ComposeFC f g a #(>$) :: b -> ComposeFC f g b -> ComposeFC f g a # (Applicative f, Decidable g) => Decidable (ComposeFC f g) # Methodslose :: (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) # Methodsdivide :: (a -> (b, c)) -> ComposeFC f g b -> ComposeFC f g c -> ComposeFC f g a #conquer :: ComposeFC f g a # newtype ComposeCF f g a # Composition of contravariant and covariant functors Constructors  ComposeCF FieldsgetComposeCF :: f (g a) Instances  (Functor f, Functor g) => Functor (ComposeCF f g) # Methodsfmap :: (a -> b) -> ComposeCF f g a -> ComposeCF f g b #(<$) :: a -> ComposeCF f g b -> ComposeCF f g a # (Contravariant f, Functor g) => Contravariant (ComposeCF f g) # Methodscontramap :: (a -> b) -> ComposeCF f g b -> ComposeCF f g a #(>\$) :: b -> ComposeCF f g b -> ComposeCF f g a # (Divisible f, Applicative g) => Divisible (ComposeCF f g) # Methodsdivide :: (a -> (b, c)) -> ComposeCF f g b -> ComposeCF f g c -> ComposeCF f g a #conquer :: ComposeCF f g a #