[Haskell-cafe] Bracket around every IO computation monad

Felipe Almeida Lessa felipe.lessa at gmail.com
Mon Nov 15 18:50:35 EST 2010


On Mon, Nov 15, 2010 at 9:44 PM, Mitar <mmitar at gmail.com> wrote:
> I was hopping of succeeding making a "bracketing" monad by hand, to
> learn something and to make my first monad. But was not successful. I
> hope those approaches with libraries will be a good guide to me.

My approach using 'operational' package is equivalent to creating your
own monad.  The beauty of 'operational' is that you don't need to
worry about the pumbling of the monad, you just need to specify what
to do with your operations.

That said, I don't know what 'regions' may do for you that the simple
monad I presented doesn't.  Bas, what are the advantages?  As one
disadvantage, I'd say that using regions sound more complicated than
just using 'operational' =).

Cheers! =D

-- 
Felipe.


More information about the Haskell-Cafe mailing list