[Haskell-cafe] How to implement this? A case for scoped record labels?

Brent Yorgey byorgey at seas.upenn.edu
Mon Jun 1 13:07:17 EDT 2009

On Sun, May 31, 2009 at 06:20:23PM -0700, Iavor Diatchki wrote:
> and so on.  It is a bit verbose, but you only have to do it once for
> your protocol, and then you get the nice overloaded interface.

This also seems like the kind of thing perfectly suited to Template
Haskell.  Especially if the records might end up being modified,
fields added, etc., having some TH code to regenerate all the necessary
classes and instances from some compact description could be a big
win, and probably not too hard to code either.


More information about the Haskell-Cafe mailing list