#FreeAp Source

data FreeAp f a

The free applicative functor for a type constructor f.


#liftFreeAp Source

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

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

#retractFreeAp Source

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

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

#foldFreeAp Source

foldFreeAp :: forall a g f. 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 Source

hoistFreeAp :: forall a g f. (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 Source

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

Perform monoidal analysis over the free applicative functor f.