[ghc-steering-committee] Please review #496: Nothing {}, Shepherd: Eric

Simon Marlow marlowsd at gmail.com
Thu Jun 23 10:00:12 UTC 2022


LGTM

On Sun, 12 Jun 2022 at 17:19, Eric Seidel <eric at seidel.io> wrote:

> Dear Committee,
>
> This proposal notes an inconsistency around record wildcard syntax where
> the wildcard selector/binder cannot be used with nullary record
> constructors. In other words
>
> ```
> data Foo = Foo {}
>
> x = Foo {..}
> ```
>
> is rejected with the error
>
>     Illegal `..' notation for constructor ‘Bar’
>       The constructor has no labelled fields
>
> John notes that this is unnecessary friction that also causes grief for
> code generators.
>
> The proposal is to allow the use of record wildcard syntax with nullary
> constructors. Notably the proposal suggests allowing wildcard syntax with
> both nullary *records* and nullary positional data constructors, ie both of
> the following would be allowed.
>
> ```
> data Foo = Foo {}
> data Foo = Foo
>
> x = Foo {..}
> ```
>
> I noted on GitHub that this leaves a small asymmetry[1], but I still
> recommend accepting the proposal as is.
>
> As usual, please discuss the proposal's merits in this thread, and the
> technical details on GitHub.
>
> [1]:
> https://github.com/ghc-proposals/ghc-proposals/pull/496#issuecomment-1153221981
>
> Eric
>
> On Mon, May 30, 2022, at 09:28, Joachim Breitner wrote:
> > Dear Committee,
> >
> > Empty records with {}
> > have been proposed by John Ericsson
> >
> >
> > https://github.com/ghc-proposals/ghc-proposals/pull/496
> >
> https://github.com/Ericson2314/ghc-proposals/blob/empty-record-wildcards/proposals/0000-empty-record-wildcards.rst
> >
> > This seems to be about straightening a corner case, so to say. I
> > suggest Eric as the shepherd.
> >
> > Please guide us to a conclusion as outlined in
> > https://github.com/ghc-proposals/ghc-proposals#committee-process
> >
> > Thanks,
> > Joachim
> >
> >
> >
> >
> >
> >
> >
> > --
> > Joachim Breitner
> >   mail at joachim-breitner.de
> >   http://www.joachim-breitner.de/
> >
> > _______________________________________________
> > ghc-steering-committee mailing list
> > ghc-steering-committee at haskell.org
> > https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20220623/8907bc9d/attachment.html>


More information about the ghc-steering-committee mailing list