
Could someone outline for me the downsides of using the Prompt monad?
For one thing I find its definition to be overcomplicated for what it does. For another the same can be achieved with free monads in a more transparent and flexible manner: import Control.Monad.Free.Class data PromptF a b x = PromptF (b -> x) a deriving (Functor) prompt :: (MonadFree (PromptF a b) m) => a -> m b prompt = liftF . PromptF id Now the kinds of extra effects that you allow depends on which free monad implementation you use. If you use F, you get the equivalent of Prompt, if you use FT, you get PromptT. In the F case the iter function corresponds to runPrompt, iterM corresponds to runPromptM. In the FT case there are iterT and iterTM. Greets ertes