
4 Nov
2010
4 Nov
'10
12:11 p.m.
On Wed, Nov 03, 2010 at 12:44:33PM -0400, Brent Yorgey wrote:
As an experience report, I just ported the diagrams package to mtl-2. As a matter of fact it did require some changes, because one place in the code explicitly used the Cont constructor which had to be changed to ContT (and some Identity wrapping and unwrapping added). But it wasn't a big deal and it works fine now.
The transformers package has (in Control.Monad.Trans.Cont) a function cont :: ((a -> r) -> r) -> Cont r a to serve as a plugin replacement for the Cont constructor (and similarly for the other base monads that are now type synonyms). One could argue that these should be re-exported by mtl-2, but I was aiming for maximum compatibility.