[Haskell-cafe] Set monad

Edward Z. Yang ezyang at MIT.EDU
Sat Jan 8 22:40:09 CET 2011


Hello Peter,

This is a classic problem with the normal monad type class.  You can
achieve this with "restricted monads", but there is a bit of tomfoolery
you have to do to get do-notation support for them.

Here is some relevant reading:

    - http://okmij.org/ftp/Haskell/types.html#restricted-datatypes
    - http://hackage.haskell.org/package/rmonad-0.4.1

Cheers,
Edward



More information about the Haskell-Cafe mailing list