GHC support for the new "record" package
marlowsd at gmail.com
Tue Jan 20 21:44:37 UTC 2015
For those who haven't seen this, Nikita Volkov proposed a new approach
to anonymous records, which can be found in the "record" package on
It had a *lot* of attention on Reddit:
Now, the solution is very nice and lightweight, but because it is
implemented outside GHC it relies on quasi-quotation (amazing that it
can be done at all!). It has some limitations because it needs to parse
Haskell syntax, and Haskell is big. So we could make this a lot
smoother, both for the implementation and the user, by directly
supporting anonymous record syntax in GHC. Obviously we'd have to move
the library code into base too.
This message is by way of kicking off the discussion, since nobody else
seems to have done so yet. Can we agree that this is the right thing
and should be directly supported by GHC? At this point we'd be aiming
Who is interested in working on this? Nikita?
There are various design decisions to think about. For example, when
the quasi-quote brackets are removed, the syntax will conflict with the
existing record syntax. The syntax ends up being similar to Simon's
(there are major differences though, notably the use of lenses for
selection and update).
I created a template wiki page:
More information about the ghc-devs