[ghc-steering-committee] Proposal #167 (Deprecated Entities): Request for comments

Simon Marlow marlowsd at gmail.com
Mon Feb 4 08:44:43 UTC 2019


The point of "pattern" (I believe) is that we want it to be invisible to
the importer whether a constructor name was declared as a pattern synonym
or a real data constructor, to allow abstraction and smooth migration of
APIs when the concrete representation of a datatype changes. However, it
would also make sense to allow "data" instead of "pattern", with exactly
the same meaning (import either a data constructor or a pattern synonym
with the given name). I wonder why we didn't do that.

On this proposal, I think the named, standalone variant is preferable to
the positional variant if we choose only one, because it allows more
flexibility.  Although I could imagine both being useful.

Cheers
Simon

On Mon, 4 Feb 2019 at 02:39, Eric Seidel <eric at seidel.io> wrote:

> In
> https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0008-type-infix.rst
> we already have an approved alternative: "value".
>
> On Sun, Feb 3, 2019, at 17:50, Joachim Breitner wrote:
> > Hi,
> >
> > Am Sonntag, den 03.02.2019, 10:45 -0500 schrieb Eric Seidel:
> > > I'm more bothered by the fact that the data/constructor tag has now
> > > become 'pattern', which feels to me like it should only apply to
> > > pattern synonyms. But according to
> > >
> https://github.com/ghc-proposals/ghc-proposals/pull/167#issuecomment-425736470
> > > it sounds like that ship may have sailed already if we want to be
> > > consistent (which we should!).
> >
> > We can maybe fix it consistently, and phase out “pattern” (make it an
> > alias for whatever we choose) … but do we have an obviously appropriate
> > name?
> >
> > Cheers,
> > 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
> > Email had 1 attachment:
> > + signature.asc
> >   1k (application/pgp-signature)
> _______________________________________________
> 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/20190204/8e675fae/attachment-0001.html>


More information about the ghc-steering-committee mailing list