20 Feb
2005
20 Feb
'05
9:16 a.m.
Benjamin Franksen wrote:
This library class defines the operations on a record:
class RecordField r l t | r l -> t where getField :: l -> r -> t putField :: l -> t -> r -> r
I have once written a short note about how Haskell'98 records could be made more useful using a conservative extensions. The suggested implementation method corresponds quite closely to what you sketch here. Here is the url: <http://www.cs.uu.nl/~daan/download/papers/records.pdf> It should be interesting to read about the different tradeoffs of extending the current record system, but keep in mind that this is a just a quick writeup of ideas (and written two years ago!) -- Daan.