[Haskell-cafe] Type constraints and classes
Brent Yorgey
byorgey at seas.upenn.edu
Sun Apr 26 10:57:24 EDT 2009
On Sun, Apr 26, 2009 at 03:23:17PM +0200, Thomas van Noort wrote:
> This is a recurring problem[1] and I'm still looking for a really
> satisfying solution. The only working and non-verbose solution I found is
> the one Miguel suggests. Although I'm not too fond of splitting up the
> monadic functions into separate type classes. A similar solution is
> described elsewhere[2]. It also desribes how you can use Template Haskell
> to regain the power of the do-notation with your own restricted monad type
> class.
>
> Kind regards,
> Thomas
>
> [1]
> http://www.nabble.com/Monad-instance-for-Data.Set%2C-again-td16259448.html
>
> [2]
> http://www.randomhacks.net/articles/2007/03/15/data-set-monad-haskell-macros
Have you tried the rmonad package[1] ? I haven't tried it myself but
it seems to be exactly what you want.
-Brent
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/rmonad
More information about the Haskell-Cafe
mailing list