[Haskell-cafe] StateWriter: a monad-writing exercise

Anthony LODI anthony.lodi at gmail.com
Thu Sep 25 13:56:28 EDT 2008


On Thu, Sep 25, 2008 at 10:34 AM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
> Instead of rewriting from scratch, you can also define
>
>  newtype StateWriter l s a = StateWriter (StateT s (Writer l) a)

Thanks for the tip!  I knew there must be a way to reuse some of the
existing machinery.  I'll post back after I try this out.


More information about the Haskell-Cafe mailing list