[ghc-steering-committee] #371: Stop treating ~ magically. Rec: weak accept

Simon Peyton Jones simonpj at microsoft.com
Thu Apr 22 09:39:36 UTC 2021


I don't feel strongly about this one.  Happy to accept Richard's recommendation.

Simon

From: ghc-steering-committee <ghc-steering-committee-bounces at haskell.org> On Behalf Of Richard Eisenberg
Sent: 22 April 2021 03:10
To: Vladislav Zavialov (int-index) <vlad.z.4096 at gmail.com>
Cc: Simon Peyton Jones via ghc-steering-committee <ghc-steering-committee at haskell.org>
Subject: Re: [ghc-steering-committee] #371: Stop treating ~ magically. Rec: weak accept

Hi committee,

This proposal has been updated to include exporting (~) from the Prelude. This means that migration is much easier than it was previously, likely not requiring any import changes (or just in a project's custom Prelude). Users will have to enable -XTypeOperators (and could choose to disable -XGADTs or -XTypeFamilies). With this new export, I'm more firmly in favor of cleaning up this one little corner: let's accept.

I will wait one week for any comments, and then will accept this proposal.

Thanks,
Richard


On Apr 1, 2021, at 2:37 PM, Richard Eisenberg <rae at richarde.dev<mailto:rae at richarde.dev>> wrote:




On Apr 1, 2021, at 3:59 AM, Vladislav Zavialov (int-index) <vlad.z.4096 at gmail.com<mailto:vlad.z.4096 at gmail.com>> wrote:

Exporting from Prelude is not a panacea: without a compatibility fallback, users of custom preludes will be affected. The proposed migration story means that for 8 releases, no existing code will break at all.

Right. I wasn't suggesting a change to the migration plan -- just that (~) would additionally be exported from the Prelude. The warning would trigger only when (~) isn't in scope, meaning that many users won't need to react to this change (given that -XTypeOperators is now on by default).

As for the specialness of ~: yes, it's special, but we export other special things from the Prelude, like $ (which automatically enables -XImpredicativeTypes).

On Apr 1, 2021, at 9:59 AM, Alejandro Serrano Mena <trupill at gmail.com<mailto:trupill at gmail.com>> wrote:

I meant the usual convention that type constructors must start with a capital letter or the : symbol. But in this case I had forgotten that with TypeOperators on, those conventions behave differently for types than for terms.

This used to be true, but the requirement that the first letter be a capital letter or : was dropped some time ago -- before I started using Haskell, in any case. It is independent of -XTypeOperators, which is necessary for any infix type level syntax.




But those custom preludes would have to be updated anyway, right?

Yes, they would.

Richard
_______________________________________________
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/20210422/48222023/attachment-0001.html>


More information about the ghc-steering-committee mailing list