Choosing implementation depending on class instances using
rewriting rules
Niklas Broberg
niklas.broberg at gmail.com
Wed Jun 3 07:17:14 EDT 2009
Hi Milan,
> Is there a way to write such a rewriting rule or there is no way of acquiring
> the Ord dictionary in rewrite rule? Or does anyone know any other way
> of implementing such a nub without explicitly listing all Ord instances?
Have a look at http://okmij.org/ftp/Haskell/types.html#class-based-dispatch
Cheers,
/Niklas
More information about the Glasgow-haskell-users
mailing list