Module

Control.Applicative.Free

#FreeAp

data FreeAp f a

The free applicative functor for a type constructor f.

Instances

#liftFreeAp

liftFreeAp :: forall f a. f a -> FreeAp f a

Lift a value described by the type constructor f into the free applicative functor.

#retractFreeAp

retractFreeAp :: forall f a. Applicative f => FreeAp f a -> f a

Run a free applicative functor using the applicative instance for the type constructor f.

#foldFreeAp

foldFreeAp :: forall f g a. Applicative g => (f ~> g) -> FreeAp f a -> g a

Run a free applicative functor with a natural transformation from the type constructor f to the applicative functor g.

#hoistFreeAp

hoistFreeAp :: forall f g a. (f ~> g) -> FreeAp f a -> FreeAp g a

Natural transformation from FreeAp f a to FreeAp g a given a natural transformation from f to g.

#analyzeFreeAp

analyzeFreeAp :: forall f m a. Monoid m => (forall b. f b -> m) -> FreeAp f a -> m

Perform monoidal analysis over the free applicative functor f.

Modules