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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to