Records in Haskell

Donn Cave donn at avvanta.com
Wed Dec 28 18:12:08 CET 2011


Quoth Greg Weber <greg at gregweber.info>,
...
> Many of the built-in record proposals seem more ambitious (create a new
> record from an existing one, generalize in some other direction). More
> power or generalization could be very useful, but it can wait for later -
> Haskell's records are glaringly bad because they lack name-spacing.
>
> I think one of the problems being faced with improving records is a false
> choice between a quick but hacky library desugaring or a major "Extensible"
> records built into the compiler. What I am proposing is that (unless
> someone proposes a great desugaring solution) we make it the immediate goal
> to have records built into the compiler, but done in the simplest (perhaps
> least "Extensible") way that just accomplishes name-spacing.

It's sure easy to imagine something like that happening, in principle,
but ... are you saying that extensibility specifically has been a major
issue?  Could be, I haven't been paying so much attention.

Wouldn't extensibility more or less come along with row polymorphism?
I mean, my understanding of the term is that an expression that
instantiates a particular record field, can incorporate a record lacking
that field, which seems to me to be implicit in row polymorphism anyway.
I would think row polymorphism is a must-have.

If you're interested in looking at old, Haskell-related record systems,
also see O'Haskell.

	Donn



More information about the Glasgow-haskell-users mailing list