Module
Data.NaturalTransformation
- Package
- purescript-prelude
- Repository
- purescript/purescript-prelude
#NaturalTransformation Source
type NaturalTransformation :: forall k. (k -> Type) -> (k -> Type) -> Type
type NaturalTransformation f g = forall a. f a -> g a
A type for natural transformations.
A natural transformation is a mapping between type constructors of kind
k -> Type
, for any kind k
, where the mapping operation has no ability
to manipulate the inner values.
An example of this is the fromFoldable
function provided in
purescript-lists
, where some foldable structure containing values of
type a
is converted into a List a
.
The definition of a natural transformation in category theory states that
f
and g
should be functors, but the Functor
constraint is not
enforced here; that the types are of kind k -> Type
is enough for our
purposes.
- Modules
- Control.
Applicative - Control.
Apply - Control.
Bind - Control.
Category - Control.
Monad - Control.
Semigroupoid - Data.
Boolean - Data.
BooleanAlgebra - Data.
Bounded - Data.
Bounded. Generic - Data.
CommutativeRing - Data.
DivisionRing - Data.
Eq - Data.
Eq. Generic - Data.
EuclideanRing - Data.
Field - Data.
Function - Data.
Functor - Data.
Generic. Rep - Data.
HeytingAlgebra - Data.
HeytingAlgebra. Generic - Data.
Monoid - Data.
Monoid. Additive - Data.
Monoid. Conj - Data.
Monoid. Disj - Data.
Monoid. Dual - Data.
Monoid. Endo - Data.
Monoid. Generic - Data.
Monoid. Multiplicative - Data.
NaturalTransformation - Data.
Ord - Data.
Ord. Generic - Data.
Ordering - Data.
Reflectable - Data.
Ring - Data.
Ring. Generic - Data.
Semigroup - Data.
Semigroup. First - Data.
Semigroup. Generic - Data.
Semigroup. Last - Data.
Semiring - Data.
Semiring. Generic - Data.
Show - Data.
Show. Generic - Data.
Symbol - Data.
Unit - Data.
Void - Prelude
- Record.
Unsafe - Type.
Proxy