Records in Haskell

Greg Weber greg at
Wed Dec 28 19:01:53 CET 2011

On Wed, Dec 28, 2011 at 2:12 PM, Donn Cave <donn at> wrote:

> Quoth Greg Weber <greg at>,
> ...
> > 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.

Yes, I believe it is common knowledge and stated in many places that the
community cannot decide on the best *extensible* record system.

> 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.

Perhaps if you want *extensible* records. If you would like to make some
progress with records in the near future rather than keeping records in
limbo, I think we really need to give up for the moment on any higher form
of abstraction than straight-forward name-spacing.

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

I am interested in any potential solution. You could link to it on the
ExtensibleRecords wiki page and explain it a bit for future
reference. O'Haskell seems to be very much concerned with being as
extensible as possible - to the point of trying to do OO in Haskell.

Greg Weber

>        Donn
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list