Records in Haskell
Claus Reinke
claus.reinke at talk21.com
Mon Nov 7 18:16:41 CET 2011
> I am unsure which of this list of proposals you are referring to. The
> URL you quote is this
> http://hackage.haskell.org/trac/haskell-prime/wiki/FirstClassLabels
That sounds familiar, I think I wrote that when I was younger;-)
> but it doesn't seem to actually contain a design, merely some options
> for a design that is implicit.
Please note that this particular instance of FirstClassLabels was *not*
about record systems themselves (already a hopeless mess of proposals
and preferences back then), but about a feature that would help defining
record systems *in the language*.
So it only outlines designs for shared type-level labels (two of which
seemed fairly straightforward, one too open-ended), addressing one
specific aspect shared by all advanced record systems (though there
are several systems floating around that do not have first-class labels).
Some years later, I found a work-around for creating shared type-level
labels, outlined in this message, and implemented as Data.Label:
Non-atomic "atoms" for type-level programming
http://www.haskell.org/pipermail/haskell-cafe/2009-April/059819.html
My Haskell community page,
http://community.haskell.org/~claus/
near the bottom, has both my Data.Record and my Data.Label sources.
I don't get to do much Haskell these days, though, so the code might
need tweaking for recent GHC versions.
Just in case there are any interested parties who have the time and
inclination to take this further;-)
Claus
More information about the Glasgow-haskell-users
mailing list