Module

Data.Yoneda

Package
purescript-free
Repository
purescript/purescript-free

#Yoneda Source

newtype Yoneda f a

The Yoneda Functor

Yoneda f is a Functor for any type constructor f.

Constructors

  • Yoneda (forall b. (a -> b) -> f b)

Instances

#runYoneda Source

runYoneda :: forall f a b. Yoneda f a -> (a -> b) -> f b

Run a computation of type Yoneda f a.

#liftYoneda Source

liftYoneda :: forall f a. Functor f => f a -> Yoneda f a

Lift a value described by the Functor f to the Functor Yoneda f.

#lowerYoneda Source

lowerYoneda :: forall f a. Yoneda f a -> f a

Lower a value of type Yoneda f a to the type constructor f.

#hoistYoneda Source

hoistYoneda :: forall f g a. (f ~> g) -> Yoneda f a -> Yoneda g a

Use a natural transformation to change the generating type constructor of a Yoneda.