
8 Jan
2011
8 Jan
'11
4:40 p.m.
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