GHC support for the new "record" package

Simon Peyton Jones simonpj at microsoft.com
Mon Jan 26 12:24:40 UTC 2015


I really like this proposal (except I would bike shed about the syntax for record selector to be dot, like in the majority of languages.)
In other languages dot is a binary operator, so that r.x selects the x field from record r.

In this proposal #x is a unary operator (more of a lexical modifier really), which returns a first-class composable value for the field.  Only later does it meet a record.  This is a big difference.

(Moreover, debating dot has proved a graveyard for previous discussions.)

I’m glad you like the base proposal.

Simon

From: Johan Tibell [mailto:johan.tibell at gmail.com]
Sent: 24 January 2015 01:05
To: Simon Peyton Jones
Cc: Adam Gundry; Iavor Diatchki; Simon Marlow; ghc-devs at haskell.org
Subject: Re: GHC support for the new "record" package

I really like this proposal (except I would bike shed about the syntax for record selector to be dot, like in the majority of languages.)

On Fri, Jan 23, 2015 at 3:41 PM, Simon Peyton Jones <simonpj at microsoft.com<mailto:simonpj at microsoft.com>> wrote:
| I just
| noticed that it effectively gives us a syntax for identifier-like Symbol
| singletons, which could be useful in completely different contexts

Indeed so.  I have written a major increment to
https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields/Redesign
which people reading this thread may find interesting.  Look for "Plan B".

For the first time I think I can see a nice, simple, elegant, orthogonal story.

Simon
_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
http://www.haskell.org/mailman/listinfo/ghc-devs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20150126/a476fa91/attachment.html>


More information about the ghc-devs mailing list