morphisms-functors-0.1.5: Functors, theirs compositions and transformations

Safe HaskellSafe
LanguageHaskell2010

Control.Functor.Contravariant

Synopsis

Documentation

class Contravariant (t :: * -> *) where Source #

When providing a new instance, you should ensure it satisfies the two laws:
* Identity morphism: contramap identity ≡ identity
* Composition of morphisms: contramap f . contramap g ≡ contramap (g . f)

Minimal complete definition

(>$<)

Methods

(>$<) :: (a -> b) -> t b -> t a infixl 4 Source #

Infix version of contramap

contramap :: (a -> b) -> t b -> t a Source #

Prefix version of >$<

(>$) :: b -> t b -> t a infixl 4 Source #

Replace all locations in the output with the same value

($<) :: t b -> b -> t a infixl 4 Source #

Flipped version of >$

full :: t () -> t a Source #

Fill the input of evaluation

Instances
Contravariant (Constant a :: * -> *) Source # 
Instance details

Defined in Data.Functor.Constant

Methods

(>$<) :: (a0 -> b) -> Constant a b -> Constant a a0 Source #

contramap :: (a0 -> b) -> Constant a b -> Constant a a0 Source #

(>$) :: b -> Constant a b -> Constant a a0 Source #

($<) :: Constant a b -> b -> Constant a a0 Source #

full :: Constant a () -> Constant a a0 Source #

(Covariant t, Contravariant u) => Contravariant (T Co Contra t u) Source # 
Instance details

Defined in Data.Functor.Composition.T

Methods

(>$<) :: (a -> b) -> T Co Contra t u b -> T Co Contra t u a Source #

contramap :: (a -> b) -> T Co Contra t u b -> T Co Contra t u a Source #

(>$) :: b -> T Co Contra t u b -> T Co Contra t u a Source #

($<) :: T Co Contra t u b -> b -> T Co Contra t u a Source #

full :: T Co Contra t u () -> T Co Contra t u a Source #

(Contravariant t, Covariant u) => Contravariant (T Contra Co t u) Source # 
Instance details

Defined in Data.Functor.Composition.T

Methods

(>$<) :: (a -> b) -> T Contra Co t u b -> T Contra Co t u a Source #

contramap :: (a -> b) -> T Contra Co t u b -> T Contra Co t u a Source #

(>$) :: b -> T Contra Co t u b -> T Contra Co t u a Source #

($<) :: T Contra Co t u b -> b -> T Contra Co t u a Source #

full :: T Contra Co t u () -> T Contra Co t u a Source #

(Covariant t, Covariant u, Contravariant v) => Contravariant (TT Co Co Contra t u v) Source # 
Instance details

Defined in Data.Functor.Composition.TT

Methods

(>$<) :: (a -> b) -> TT Co Co Contra t u v b -> TT Co Co Contra t u v a Source #

contramap :: (a -> b) -> TT Co Co Contra t u v b -> TT Co Co Contra t u v a Source #

(>$) :: b -> TT Co Co Contra t u v b -> TT Co Co Contra t u v a Source #

($<) :: TT Co Co Contra t u v b -> b -> TT Co Co Contra t u v a Source #

full :: TT Co Co Contra t u v () -> TT Co Co Contra t u v a Source #

(Covariant t, Contravariant u, Covariant v) => Contravariant (TT Co Contra Co t u v) Source # 
Instance details

Defined in Data.Functor.Composition.TT

Methods

(>$<) :: (a -> b) -> TT Co Contra Co t u v b -> TT Co Contra Co t u v a Source #

contramap :: (a -> b) -> TT Co Contra Co t u v b -> TT Co Contra Co t u v a Source #

(>$) :: b -> TT Co Contra Co t u v b -> TT Co Contra Co t u v a Source #

($<) :: TT Co Contra Co t u v b -> b -> TT Co Contra Co t u v a Source #

full :: TT Co Contra Co t u v () -> TT Co Contra Co t u v a Source #

(Contravariant t, Covariant u, Covariant v) => Contravariant (TT Contra Co Co t u v) Source # 
Instance details

Defined in Data.Functor.Composition.TT

Methods

(>$<) :: (a -> b) -> TT Contra Co Co t u v b -> TT Contra Co Co t u v a Source #

contramap :: (a -> b) -> TT Contra Co Co t u v b -> TT Contra Co Co t u v a Source #

(>$) :: b -> TT Contra Co Co t u v b -> TT Contra Co Co t u v a Source #

($<) :: TT Contra Co Co t u v b -> b -> TT Contra Co Co t u v a Source #

full :: TT Contra Co Co t u v () -> TT Contra Co Co t u v a Source #

(Contravariant t, Contravariant u, Contravariant v) => Contravariant (TT Contra Contra Contra t u v) Source # 
Instance details

Defined in Data.Functor.Composition.TT

Methods

(>$<) :: (a -> b) -> TT Contra Contra Contra t u v b -> TT Contra Contra Contra t u v a Source #

contramap :: (a -> b) -> TT Contra Contra Contra t u v b -> TT Contra Contra Contra t u v a Source #

(>$) :: b -> TT Contra Contra Contra t u v b -> TT Contra Contra Contra t u v a Source #

($<) :: TT Contra Contra Contra t u v b -> b -> TT Contra Contra Contra t u v a Source #

full :: TT Contra Contra Contra t u v () -> TT Contra Contra Contra t u v a Source #

(Covariant t, Covariant u, Covariant v, Contravariant w) => Contravariant (TTT Co Co Co Contra t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Co Co Co Contra t u v w b -> TTT Co Co Co Contra t u v w a Source #

contramap :: (a -> b) -> TTT Co Co Co Contra t u v w b -> TTT Co Co Co Contra t u v w a Source #

(>$) :: b -> TTT Co Co Co Contra t u v w b -> TTT Co Co Co Contra t u v w a Source #

($<) :: TTT Co Co Co Contra t u v w b -> b -> TTT Co Co Co Contra t u v w a Source #

full :: TTT Co Co Co Contra t u v w () -> TTT Co Co Co Contra t u v w a Source #

(Covariant t, Covariant u, Contravariant v, Covariant w) => Contravariant (TTT Co Co Contra Co t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Co Co Contra Co t u v w b -> TTT Co Co Contra Co t u v w a Source #

contramap :: (a -> b) -> TTT Co Co Contra Co t u v w b -> TTT Co Co Contra Co t u v w a Source #

(>$) :: b -> TTT Co Co Contra Co t u v w b -> TTT Co Co Contra Co t u v w a Source #

($<) :: TTT Co Co Contra Co t u v w b -> b -> TTT Co Co Contra Co t u v w a Source #

full :: TTT Co Co Contra Co t u v w () -> TTT Co Co Contra Co t u v w a Source #

(Covariant t, Contravariant u, Covariant v, Covariant w) => Contravariant (TTT Co Contra Co Co t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Co Contra Co Co t u v w b -> TTT Co Contra Co Co t u v w a Source #

contramap :: (a -> b) -> TTT Co Contra Co Co t u v w b -> TTT Co Contra Co Co t u v w a Source #

(>$) :: b -> TTT Co Contra Co Co t u v w b -> TTT Co Contra Co Co t u v w a Source #

($<) :: TTT Co Contra Co Co t u v w b -> b -> TTT Co Contra Co Co t u v w a Source #

full :: TTT Co Contra Co Co t u v w () -> TTT Co Contra Co Co t u v w a Source #

(Covariant t, Contravariant u, Contravariant v, Contravariant w) => Contravariant (TTT Co Contra Contra Contra t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Co Contra Contra Contra t u v w b -> TTT Co Contra Contra Contra t u v w a Source #

contramap :: (a -> b) -> TTT Co Contra Contra Contra t u v w b -> TTT Co Contra Contra Contra t u v w a Source #

(>$) :: b -> TTT Co Contra Contra Contra t u v w b -> TTT Co Contra Contra Contra t u v w a Source #

($<) :: TTT Co Contra Contra Contra t u v w b -> b -> TTT Co Contra Contra Contra t u v w a Source #

full :: TTT Co Contra Contra Contra t u v w () -> TTT Co Contra Contra Contra t u v w a Source #

(Contravariant t, Covariant u, Covariant v, Covariant w) => Contravariant (TTT Contra Co Co Co t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Contra Co Co Co t u v w b -> TTT Contra Co Co Co t u v w a Source #

contramap :: (a -> b) -> TTT Contra Co Co Co t u v w b -> TTT Contra Co Co Co t u v w a Source #

(>$) :: b -> TTT Contra Co Co Co t u v w b -> TTT Contra Co Co Co t u v w a Source #

($<) :: TTT Contra Co Co Co t u v w b -> b -> TTT Contra Co Co Co t u v w a Source #

full :: TTT Contra Co Co Co t u v w () -> TTT Contra Co Co Co t u v w a Source #

(Contravariant t, Covariant u, Contravariant v, Contravariant w) => Contravariant (TTT Contra Co Contra Contra t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Contra Co Contra Contra t u v w b -> TTT Contra Co Contra Contra t u v w a Source #

contramap :: (a -> b) -> TTT Contra Co Contra Contra t u v w b -> TTT Contra Co Contra Contra t u v w a Source #

(>$) :: b -> TTT Contra Co Contra Contra t u v w b -> TTT Contra Co Contra Contra t u v w a Source #

($<) :: TTT Contra Co Contra Contra t u v w b -> b -> TTT Contra Co Contra Contra t u v w a Source #

full :: TTT Contra Co Contra Contra t u v w () -> TTT Contra Co Contra Contra t u v w a Source #

(Contravariant t, Contravariant u, Covariant v, Contravariant w) => Contravariant (TTT Contra Contra Co Contra t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Contra Contra Co Contra t u v w b -> TTT Contra Contra Co Contra t u v w a Source #

contramap :: (a -> b) -> TTT Contra Contra Co Contra t u v w b -> TTT Contra Contra Co Contra t u v w a Source #

(>$) :: b -> TTT Contra Contra Co Contra t u v w b -> TTT Contra Contra Co Contra t u v w a Source #

($<) :: TTT Contra Contra Co Contra t u v w b -> b -> TTT Contra Contra Co Contra t u v w a Source #

full :: TTT Contra Contra Co Contra t u v w () -> TTT Contra Contra Co Contra t u v w a Source #

(Contravariant t, Contravariant u, Contravariant v, Covariant w) => Contravariant (TTT Contra Contra Contra Co t u v w) Source # 
Instance details

Defined in Data.Functor.Composition.TTT

Methods

(>$<) :: (a -> b) -> TTT Contra Contra Contra Co t u v w b -> TTT Contra Contra Contra Co t u v w a Source #

contramap :: (a -> b) -> TTT Contra Contra Contra Co t u v w b -> TTT Contra Contra Contra Co t u v w a Source #

(>$) :: b -> TTT Contra Contra Contra Co t u v w b -> TTT Contra Contra Contra Co t u v w a Source #

($<) :: TTT Contra Contra Contra Co t u v w b -> b -> TTT Contra Contra Contra Co t u v w a Source #

full :: TTT Contra Contra Contra Co t u v w () -> TTT Contra Contra Contra Co t u v w a Source #