explicit-sharing-0.3.1: Explicit Sharing of Monadic Effects

Control.Monad.Sharing.Lazy

Synopsis

Documentation

data Lazy m a Source

Continuation-based, store-passing implementation of explicit | sharing. It is an inlined version of ContT (ReaderT Store m) | where the result type of continuations is polymorphic.

Instances

Monad m => Monad (Lazy m) 
MonadPlus m => MonadPlus (Lazy m) 
Monad m => Sharing (Lazy m) 

evalLazy :: (Monad m, Trans (Lazy m) a b) => Lazy m a -> m bSource

Lifts all monadic effects to the top-level and unwraps the monad | transformer for explicit sharing.