[ghc-steering-committee] Proposal: Type Fixity (#65), Consensus: accept, own language extension?

Simon Peyton Jones simonpj at microsoft.com
Tue Oct 17 08:38:34 UTC 2017


Something like (1) or (2) do seem attractive.  But we have, for better or worse, always taken a non-rigid position on back-compat.  If it seems the right thing to change a language feature slightly, we have typically done so.  For the most part no one notices.

Perhaps that’s because a far bigger issue is changes to the base library: those really do affect people.  And because of that I don’t think we’ll ever be able to rename and typecheck all of Hackage with any old GHC; there’s always a version range involved.

So I think I’m in favour of (3), but with breaches of (1,2) handled with explicit judgement rather than cavalier disregard.

Simon
From: ghc-steering-committee [mailto:ghc-steering-committee-bounces at haskell.org] On Behalf Of Simon Marlow
Sent: 17 October 2017 08:54
To: Iavor Diatchki <iavor.diatchki at gmail.com>
Cc: ghc-steering-committee at haskell.org
Subject: Re: [ghc-steering-committee] Proposal: Type Fixity (#65), Consensus: accept, own language extension?

The main reason I took a position on the issue of extension flags is to force the question: what should LANGUAGE mean? I think it's important to resolve this, to inform future decisions. Here are some options:

1. LANGUAGE fully specifies the grammar of the source file
2. LANGUAGE fully specifies the grammar and semantics of the source file
3. LANGUAGE tells the compiler what extensions are required, but otherwise provides no guarantees. The source file might not compile with a given version of GHC even if it supports all the extensions listed. In other words, LANGUAGE together with a GHC version range specifies the grammar and semantics of the source file.

I think what we have right now is 3, because we change the meaning of extensions from version to version of GHC. There are advantages to 1 and 2: for example, if we had 1, then we could parse all of Hackage with haskell-src-exts (or at least identify the subset of source files that can be parsed via their LANGUAGE pragmas). If we had 2, then we could parse, rename and typecheck all of Hackage using haskell-src-exts, haskel-names, and haskell-type-exts.

Perhaps we want to say that we can only *add* syntax to an existing extension, not change or remove it. This is a variant of 3 that requires only a lower bound on the GHC version required, not an upper bound, and it provides some of the benefits of 1 and 2: you just need a sufficiently recent version of haskell-src-exts et. al.

Anyway, I mainly wanted to ensure that we're clear about what LANGUAGE means. If we believe the implications of 1 and 2 are too onerous (never changing extensions), so what we want is 3, so be it.

Cheers
Simon


On 10 October 2017 at 03:54, Iavor Diatchki <iavor.diatchki at gmail.com<mailto:iavor.diatchki at gmail.com>> wrote:


Hello,

my preference would be to add this to one of the existing extensions (either "explicit namespaces", or "type level operators").

Iavor





On Sat, Oct 7, 2017 at 11:26 AM Joachim Breitner <mail at joachim-breitner.de<mailto:mail at joachim-breitner.de>> wrote:
Hi Committee,

the discussion has ebbed down again. I observe that a clear majority is
in favor. I don’t think there is a need for a formal vote, so I will
proceed with this decision.

Simon M brought up the next issue: Shall we require a separate language
extension for this, or can it go under the hood of
`ExplicitNamespaces`?

So far Simon M expressed a strong preference for the former, while I am
 inclined to prefer the latter, and would like to hear a few more
opinions on this detail (which certainly would set precedence for
future decisions).

Richard brought up the idea of versioned language extensions; that idea
can certainly be investigated, but better independently. We have to
deal with this proposal with the tools we have.

Greetings,
Joachim


Am Mittwoch, den 20.09.2017, 12:23 -0400 schrieb Joachim Breitner:
> Hi,
>
> the type fixity proposal
> (https://github.com/ghc-proposals/ghc-proposals/pull/65<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F65&data=02%7C01%7Csimonpj%40microsoft.com%7Cfaac52c0ae0f4e79724608d515343160%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636438236268085142&sdata=d2EZ83iPvWUWKhtgqBEEXId4xg%2FAYHD2VFh6oM%2BwmQo%3D&reserved=0>)
> was met with mixed reactions.
>
>  * I recommended rejection and Manuel strongly agrees with me.
>  * SPJ does not have strong opinions either way.
>  * Richard is in favor, and Iavor agrees.
>
>
> Our process says “If consensus is elusive, then we vote, with the
> Simons retaining veto power.” It looks like this might be such a case.
> Should we go ahead and vote, or is more discussion likely to sway some
> of us?
>
> (I guess I can be swayed towards acceptance, especially if this
> proposal re-uses existing syntactic idioms from export lists with
> ExplicitNamespaces on.)
>
> Greetings,
> Joachim
>
>
>
> Am Sonntag, den 27.08.2017, 20:16 +0200 schrieb Joachim Breitner:
> > Dear Committee,
> >
> > Ryan Scott’s proposal to allow fixity declaration to explicitly target
> > values or types has been brought before us:
> > https://github.com/RyanGlScott/ghc-proposals/blob/type-infix/0000-type-infix.rst<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRyanGlScott%2Fghc-proposals%2Fblob%2Ftype-infix%2F0000-type-infix.rst&data=02%7C01%7Csimonpj%40microsoft.com%7Cfaac52c0ae0f4e79724608d515343160%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636438236268085142&sdata=9deOwM4rC4Ckum0lvNirj44NMIqXKzoiUPyMg4DgJQU%3D&reserved=0>
> > https://github.com/ghc-proposals/ghc-proposals/pull/65<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F65&data=02%7C01%7Csimonpj%40microsoft.com%7Cfaac52c0ae0f4e79724608d515343160%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636438236268085142&sdata=d2EZ83iPvWUWKhtgqBEEXId4xg%2FAYHD2VFh6oM%2BwmQo%3D&reserved=0>
> >
> > I (the secretary) nominates myself as the shepherd, so I can right away
> > continue giving a recommendation.
> >
> > I propose to reject this proposal. The main reasons are:
> >  * it is not clear if there is a real use case for this. Has anyone
> >    ever complained about the status quo?
> >    The proposal does not motivate the need for a change well enough.
> >    (There is a related bug in TH, but that bug can probably simply be
> >    fixed.)
> >  * The status quo can be sold as a feature, rather than a short-coming.
> >    Namely that an operator has a fixed fixity, no matter what namespace
> >    it lives in.
> >    This matches morally what other languages do: In Gallina, fixity
> >    is assigned to names independent of their definition, AFAIK.
> >  * There is a non-trivial implementation and education overhead, a
> >    weight that is not pulled by the gains.
> >
> > If we’d design Haskell from scratch, my verdict might possibly be
> > different (but maybe we wouldn’t even allow types and values to share
> > names then…)
> >
> >
> > Please contradict me or indicate consensus by staying silent.
> >
> >
> > Greetings,
> > Joachim
> >
> > _______________________________________________
> > ghc-steering-committee mailing list
> > ghc-steering-committee at haskell.org<mailto:ghc-steering-committee at haskell.org>
> > https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
> --
> Joachim Breitner
>   mail at joachim-breitner.de<mailto:mail at joachim-breitner.de>
>   http://www.joachim-breitner.de/<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.joachim-breitner.de%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Cfaac52c0ae0f4e79724608d515343160%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636438236268085142&sdata=xvdf4zj1aKIfqxCMm%2B5DXZIrnha5Zu28YIngs3EFUE8%3D&reserved=0>
>
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org<mailto:ghc-steering-committee at haskell.org>
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
--
Joachim Breitner
  mail at joachim-breitner.de<mailto:mail at joachim-breitner.de>
  http://www.joachim-breitner.de/<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.joachim-breitner.de%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Cfaac52c0ae0f4e79724608d515343160%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636438236268085142&sdata=xvdf4zj1aKIfqxCMm%2B5DXZIrnha5Zu28YIngs3EFUE8%3D&reserved=0>
_______________________________________________
ghc-steering-committee mailing list
ghc-steering-committee at haskell.org<mailto: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<mailto: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/20171017/b5a54585/attachment-0001.html>


More information about the ghc-steering-committee mailing list