[ghc-steering-committee] Modern Scoped Type Variables #448: recommendation (mostly) accept
Richard Eisenberg
lists at richarde.dev
Mon Apr 4 17:16:44 UTC 2022
Thanks for kicking off this conversation, Arnaud!
To be clear in this thread: I'm fine delaying the discussion of section 6-8 until later.
Arnaud brings up my new principles in his initial email. Do please consider these principles as part of the deliberations, as they will become principles that we, as a committee, will have adopted.
About extensions: We, as a community and as a committee, have not come to terms with the two possible interpretations of extensions. I would like to say that, ideally, extensions are candidates for eventual inclusion. However, that is neither the current practice nor our trendline. Examples:
- any flags included in Haskell98 (including, for example, MonomorphismRestriction). These are definitely settings that one can choose per module. If they were candidates for inclusion, they wouldn't exist (because they're already included!).
- RebindableSyntax (though this is not one to mimic)
- MagicHash. My interpretation is that this extension is meant to allow users to explicitly opt into low-level code.
- Recently accepted #285 <https://github.com/ghc-proposals/ghc-proposals/pull/285>, which introduces two new -XNo... extensions (both also included in #448).
As a practical matter, then, extensions are means of customization. We might imagine a debate where we try to change this, and then come up with a way to get from where we are to that changed future.
Very specifically answering Simon M's concern: I see ExtendedForAllScope as a dead end, yes. It's included as a way of supporting the gobs and gobs and gobs of code that use today's ScopedTypeVariables, but at t=∞, we should get rid of it. Note that an optional extra <https://github.com/goldfirere/ghc-proposals/blob/type-variables/proposals/0448-type-variable-scoping.rst#58alternatives> introduces a @(..) syntax that makes TypeAbstractions significantly less repetitive, and thus about as easy to use as ExtendedForAllScope (which, recall, requires an explicit forall where there might otherwise be none).
Richard
PS: I'm on holiday starting tomorrow and so may not respond for about two weeks. Back in action on the 15th, but expect a few days of digging out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20220404/30b35d6f/attachment.html>
More information about the ghc-steering-committee
mailing list