[Haskell-cafe] ANNOUNCE: monad-control-0.3

Michael Snoyman michael at snoyman.com
Tue Dec 6 05:06:05 CET 2011


On Tue, Dec 6, 2011 at 6:04 AM, Joey Hess <joey at kitenet.net> wrote:
> Michael Snoyman wrote:
>> I just spent a fair amount of time yesterday upgrading packages to
>> monad-control 0.3. What I had to do was add in the MonadTransControl
>> and MonadBaseControl instances manually. It's actually not too
>> difficult; just copy out the instance for StateT and make a few
>> changes. Be warned that Bas used some tricky CPP stuff, however, which
>> you'll have to unwind ;).
>
> I forgot to mention that I tried doing that, based on the example in the
> haddock, but failed miserably. Care to share a working example, perhaps
> in the form of a patch to the monad-control haddock? :)
>
> --
> see shy jo

Maybe this will help[1]. It's using RWST instead of StateT, but it's
the same idea.

[1] https://github.com/yesodweb/yesod/commit/7619e4e9dd88c152d1e00b6fea073c3d52dc797f#L0R105



More information about the Haskell-Cafe mailing list