Records in Haskell

Matthew Farkas-Dyck strake888 at
Thu Jan 12 13:06:43 CET 2012

On 09/01/2012, Greg Weber <greg at> wrote:
> 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.

I told you so (^_^)

Unicode dot (∘) would be optimal, since that's what it's for. If to
type '∘' is awkward, then one can use (Control.Category.<<<). We need
not (and, in my opinion, should not) define another operator.

> 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

More information about the Glasgow-haskell-users mailing list