Portability | GADTs, Rank2Types |
---|---|

Stability | provisional |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Safe Haskell | None |

`Applicative`

functors for free

# Documentation

The free `Applicative`

for a `Functor`

`f`

.

runAp :: Applicative g => (forall x. f x -> g x) -> Ap f a -> g aSource

Given a natural transformation from `f`

to `g`

, this gives a canonical monoidal natural transformation from

to `Ap`

f`g`

.

hoistAp :: (forall a. f a -> g a) -> Ap f b -> Ap g bSource

Given a natural transformation from `f`

to `g`

this gives a monoidal natural transformation from `Ap f`

to `Ap g`

.

retractAp :: Applicative f => Ap f a -> f aSource