[Haskell-cafe] Monad instance for Data.Set, again
Ganesh Sittampalam
ganesh at earth.li
Fri Mar 28 18:20:55 EDT 2008
On Fri, 28 Mar 2008, Wolfgang Jeltsch wrote:
> But it is possible to give a construction of an Ord dictionary from an
> AssociatedMonad dictionary. See the attached code. It works like a
> charm. :-)
This is really cool, and with much wider applicability than restricted
monads; it gives us a general way to abstract over type class constraints.
The NewMonad class is also very straightforward and I think will cause
much fewer type-checking headaches and large type signatures than Oleg's
solution.
Ganesh
More information about the Haskell-Cafe
mailing list