Records in Haskell

Greg Weber greg at
Mon Jan 9 09:46:17 CET 2012

Thank you for all your feedback! I updated the wiki page accordingly.

Let us stop and take note of what this feedback is about: the most
convenient syntax for manipulating records, and much of this feedback
applies to any records proposal. That is, there are no fundamental
objections to the implementation of this records implementation. If you
give this kind of general feedback then I assume you are fine with the
name-spacing records implementation.

At this point I feel we are largely waiting on feedback from implementers
to give the implementation critiques or a green light.

But that does not need to stop us from continuing our discussion of the
best syntax for using records.
For the left-right, right-left issue, I added a discussion and potential
solution through partial application:

Partial application provides a potential solution:

   (b . .a) r

So if we have a function f r = b r.a then one can write it points-free:

   b . .a

Our longer example from above:

   e . d . .c . .b . .a

At first glance it may look odd, but it is starting to grow on me. Let us
consider more realistic usage with longer names:

   echo . delta . .charlie . .beta . .alpha

Is there are more convenient syntax for this? b <.a
Note that a move to a different operator for function composition
(discussed in dot operator section) would make things easier to parse:

   b <~ .a

where the unicode dot might be even nicer.

On Mon, Jan 9, 2012 at 3:15 AM, wren ng thornton <wren at> wrote:

> quux (y . (foo>.<  bar).baz (f . g)) moo
> It's not that easy to distinguish from
> quux (y . (foo>.<  bar) . baz (f . g)) moo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list