Records in Haskell
g9ks157k at acme.softbase.org
Tue Nov 8 20:21:15 CET 2011
Am Montag, den 07.11.2011, 23:30 +0000 schrieb Simon Peyton-Jones:
> Is there a wiki page giving a specific, concrete design for the
> proposal you advocate? Something at the level of detail of
Well, I don’t propose a new record system as a language feature.
Instead, I’ve implemented a record system as a library. The paper at
describes this in detail, and the records package at
is the actual library.
My stance is that it is possibly better if we do not try to include a
one-size-fits-it-all record system into the language, but if the
language provided support for basic things that almost all record system
*libraries* would need. In my opinion, there is at least one such thing
that should get language support: field labels. There is already the
for first-class field labels.
> I am unsure whether you regard it as an alternative to the above, or
> something that should be done as well. And if the former, how does
> it relate to the challenge articulated on
> http://hackage.haskell.org/trac/ghc/wiki/Records, namely how to make
> Haskell's existing named-field system work better?
I don’t think that everyone should use my record system. I see it as one
member of a family of reasonable record systems.
My intention, when developing my record system, was not to make the
existing system better, since I needed quite a lot of advanced features
that anything near Haskell’s existing record system couldn’t give me. So
I started something completely new.
More information about the Glasgow-haskell-users