Module
Control.Monad.Free
- Package
- purescript-free
- Repository
- purescript/purescript-free
#Free Source
data Free f a
The free monad for a type constructor f
.
Implemented in the spirit of Reflection without Remorse, the free monad is represented using a sequential data structure in order to overcome the quadratic complexity of left-associated binds and traversal through the free monad structure.
Instances
(Functor f, Eq1 f, Eq a) => Eq (Free f a)
(Functor f, Eq1 f) => Eq1 (Free f)
(Functor f, Ord1 f, Ord a) => Ord (Free f a)
(Functor f, Ord1 f, Ord a) => Ord1 (Free f)
Functor (Free f)
Bind (Free f)
Applicative (Free f)
Apply (Free f)
Monad (Free f)
MonadTrans Free
MonadRec (Free f)
(Functor f, Foldable f) => Foldable (Free f)
(Traversable f) => Traversable (Free f)
(Semigroup a) => Semigroup (Free f a)
(Monoid a) => Monoid (Free f a)
#suspendF Source
suspendF :: forall f. Applicative f => (Free f) ~> (Free f)
Suspend a value given the applicative functor f
into the free monad.