Language Extension Policy – Round 1'

Dear all, Sorry for the long silence. I was named and shamed by Joachim the other day, which is fair enough. I've basically disappeared from my email for a while. I am aware that not having solved this is holding us back, I'll be more consistent in the future. As I said in my last email, I'd like to start the conversation again from the point of view of use-cases, as proposed by Adam, and see if it helps us go forward. What I want to do, today, is to describe what Haskell programmers have been using extension for. This is meant to be purely a description, without judgement on whether the proposed use-cases are good ideas. When the use-cases are listed, we'll turn to which we want to support and how. Without further ado, here is a list of use-cases, based on Adam's list (my rephrasing), with additions by me. Haskell programmers use extensions to: 1. Gain early access to experimental or unstable features (e.g. because they're working on a research prototype, or because the feature is valuable enough to them to forgo some stability) 2. Restrict the use of more complex features (e.g. for easier onboarding of new developers or as educators to teach a well-delimited subset of the language) 3. As library authors, to signal which features the library actually uses, hence which version of GHC the library is compatible with. 4. Retain access to deprecated features to smooth out migration over the deprecation period. 5. Retain access to deprecated features indefinitely. 6. Change the default behaviour of (part of) the language (e.g. StrictData, I think some of the dependent Haskell work falls in this category, but I can't pinpoint an example) 7. Extend the language in a way that is not backward compatible (e.g. OverloadedList, probably some dependent Haskell things too) 8. Enable features whose mere presence has a performance impact (e.g. Template Haskell, and that's probably it) 9. CPP (this one is very unique isn't it?) (Note: Adam proposed some use-cases which are not included here: using extension to ensure stability (which is the contrapositive of 1), and as a GHC dev, make features available to early adopters (which is the dual of 1). I didn't include them because I consider that they are contained in 1, but if you disagree, please argue otherwise) Questions: 1. Have we missed some use-cases, if so describe? (I'm sure we have, so I'd be surprised if nothing turns up here) 2. Do you think some of the use-cases above should be split into several use-cases? 3. Conversely, are there distinctions that don't make sense to you and you would argue should be merged? Before answering, take note that while some of the proposed use-cases can be seen as a list of extensions that behave a certain way, some extensions may be used in several use-cases (4 and 5, by definition concern the same set of extensions), some use-cases (like 3) are independent of the behaviour of extensions. This is not a classification of extension, but of how they are consumed. I'll tally the result on Tuesday 10th April. Best, Arnaud

Thanks Arnaud. I'm not sure of the use to which you plan to put this list
- but it seems like a reasonable starting point.
S
On Thu, 30 Mar 2023 at 10:04, Arnaud Spiwack
Dear all,
Sorry for the long silence. I was named and shamed by Joachim the other day, which is fair enough. I've basically disappeared from my email for a while. I am aware that not having solved this is holding us back, I'll be more consistent in the future.
As I said in my last email, I'd like to start the conversation again from the point of view of use-cases, as proposed by Adam, and see if it helps us go forward. What I want to do, today, is to describe what Haskell programmers have been using extension for. This is meant to be purely a description, without judgement on whether the proposed use-cases are good ideas. When the use-cases are listed, we'll turn to which we want to support and how.
Without further ado, here is a list of use-cases, based on Adam's list (my rephrasing), with additions by me. Haskell programmers use extensions to:
1. Gain early access to experimental or unstable features (e.g. because they're working on a research prototype, or because the feature is valuable enough to them to forgo some stability) 2. Restrict the use of more complex features (e.g. for easier onboarding of new developers or as educators to teach a well-delimited subset of the language) 3. As library authors, to signal which features the library actually uses, hence which version of GHC the library is compatible with. 4. Retain access to deprecated features to smooth out migration over the deprecation period. 5. Retain access to deprecated features indefinitely. 6. Change the default behaviour of (part of) the language (e.g. StrictData, I think some of the dependent Haskell work falls in this category, but I can't pinpoint an example) 7. Extend the language in a way that is not backward compatible (e.g. OverloadedList, probably some dependent Haskell things too) 8. Enable features whose mere presence has a performance impact (e.g. Template Haskell, and that's probably it) 9. CPP (this one is very unique isn't it?)
(Note: Adam proposed some use-cases which are not included here: using extension to ensure stability (which is the contrapositive of 1), and as a GHC dev, make features available to early adopters (which is the dual of 1). I didn't include them because I consider that they are contained in 1, but if you disagree, please argue otherwise)
Questions: 1. Have we missed some use-cases, if so describe? (I'm sure we have, so I'd be surprised if nothing turns up here) 2. Do you think some of the use-cases above should be split into several use-cases? 3. Conversely, are there distinctions that don't make sense to you and you would argue should be merged?
Before answering, take note that while some of the proposed use-cases can be seen as a list of extensions that behave a certain way, some extensions may be used in several use-cases (4 and 5, by definition concern the same set of extensions), some use-cases (like 3) are independent of the behaviour of extensions. This is not a classification of extension, but of how they are consumed.
I'll tally the result on Tuesday 10th April.
Best, Arnaud _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee

Hi, thanks for your work of clearing the mist. Am Donnerstag, dem 30.03.2023 um 11:03 +0200 schrieb Arnaud Spiwack:
1. Have we missed some use-cases, if so describe? (I'm sure we have, so I'd be surprised if nothing turns up here)
Another reason, mostly for completeness, is X. Programmers use extensions to _refer_ to a particular feature when talking/writing/searching about it. They give names to concepts that might not have an obvious canonical name otherwise. Imagine LambdaCase did not have that name; it would be slightly harder to talk about it. --- Since your point 1 has an explicit list of reasons why an extension is no on by default (“experimental or unstable”, with the word “early” signaling that this status is expected to change) I wonder if we need more points for “Developer wants access to features not on-by-default for some other reasons”. In fact, you list some more reasons (4/5 – deprecated, 7 – not backward compatible, 8 – perf impact), but the list seems incomplete. For example RecordWildCards doesn’t seem to be experimental, unstable, deprecated or perf impacting to me. Nor does UnicodeSyntax. So it’s not clear to me if you meant to put them under 1 (and “experimental and unstable” needs to be extended) or under extra bullets.
From a user-point of view, it seems you could possible merge 1, 4, 5, 6, 7 and 8 as “Developer wants access to features not on by default”. The developer probably doesn’t really care _why_ the extension is not on by default, they just want to use it when they want to use it :).
And then the question of why an extension is not on by default (present, past, future…) would be separate from that. Cheers, Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/

I don't disagree with any of that. Not entirely sure where we're going...
but sure :)
Anyway, I suspect that number 7 includes more things than it might seem, if
we're really strict about backwards compatibility. Several extensions steal
some syntax, whether it's just keywords or other symbols, that will cause
code that uses the new keyword to be rejected. Just picking a few at
random: RecursiveDo, Arrows, PatternSynonyms.
Indeed while poking around I noticed some bugs
Prelude> :set -XNoRoleAnnotations
Prelude> let x :: role
<interactive>:35:10: error: parse error on input ‘role’
Cheers
Simon
On Thu, 30 Mar 2023 at 10:04, Arnaud Spiwack
Dear all,
Sorry for the long silence. I was named and shamed by Joachim the other day, which is fair enough. I've basically disappeared from my email for a while. I am aware that not having solved this is holding us back, I'll be more consistent in the future.
As I said in my last email, I'd like to start the conversation again from the point of view of use-cases, as proposed by Adam, and see if it helps us go forward. What I want to do, today, is to describe what Haskell programmers have been using extension for. This is meant to be purely a description, without judgement on whether the proposed use-cases are good ideas. When the use-cases are listed, we'll turn to which we want to support and how.
Without further ado, here is a list of use-cases, based on Adam's list (my rephrasing), with additions by me. Haskell programmers use extensions to:
1. Gain early access to experimental or unstable features (e.g. because they're working on a research prototype, or because the feature is valuable enough to them to forgo some stability) 2. Restrict the use of more complex features (e.g. for easier onboarding of new developers or as educators to teach a well-delimited subset of the language) 3. As library authors, to signal which features the library actually uses, hence which version of GHC the library is compatible with. 4. Retain access to deprecated features to smooth out migration over the deprecation period. 5. Retain access to deprecated features indefinitely. 6. Change the default behaviour of (part of) the language (e.g. StrictData, I think some of the dependent Haskell work falls in this category, but I can't pinpoint an example) 7. Extend the language in a way that is not backward compatible (e.g. OverloadedList, probably some dependent Haskell things too) 8. Enable features whose mere presence has a performance impact (e.g. Template Haskell, and that's probably it) 9. CPP (this one is very unique isn't it?)
(Note: Adam proposed some use-cases which are not included here: using extension to ensure stability (which is the contrapositive of 1), and as a GHC dev, make features available to early adopters (which is the dual of 1). I didn't include them because I consider that they are contained in 1, but if you disagree, please argue otherwise)
Questions: 1. Have we missed some use-cases, if so describe? (I'm sure we have, so I'd be surprised if nothing turns up here) 2. Do you think some of the use-cases above should be split into several use-cases? 3. Conversely, are there distinctions that don't make sense to you and you would argue should be merged?
Before answering, take note that while some of the proposed use-cases can be seen as a list of extensions that behave a certain way, some extensions may be used in several use-cases (4 and 5, by definition concern the same set of extensions), some use-cases (like 3) are independent of the behaviour of extensions. This is not a classification of extension, but of how they are consumed.
I'll tally the result on Tuesday 10th April.
Best, Arnaud _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee

👋
I see that this hasn't sparked a lot of discussion, I hope it means we're
finally finding some common ground that we agree is meaningful.
I said that I'd tally the result on “Tuesday 10th” in my initial email.
Turns out, the 10th is a Monday. As it's a bank holiday for me, the tally
will be Tuesday 11th, and you'll hear more from me a couple of days later.
On Tue, 4 Apr 2023 at 18:25, Simon Marlow
I don't disagree with any of that. Not entirely sure where we're going... but sure :)
Anyway, I suspect that number 7 includes more things than it might seem, if we're really strict about backwards compatibility. Several extensions steal some syntax, whether it's just keywords or other symbols, that will cause code that uses the new keyword to be rejected. Just picking a few at random: RecursiveDo, Arrows, PatternSynonyms.
Indeed while poking around I noticed some bugs
Prelude> :set -XNoRoleAnnotations Prelude> let x :: role
<interactive>:35:10: error: parse error on input ‘role’
Cheers Simon
On Thu, 30 Mar 2023 at 10:04, Arnaud Spiwack
wrote: Dear all,
Sorry for the long silence. I was named and shamed by Joachim the other day, which is fair enough. I've basically disappeared from my email for a while. I am aware that not having solved this is holding us back, I'll be more consistent in the future.
As I said in my last email, I'd like to start the conversation again from the point of view of use-cases, as proposed by Adam, and see if it helps us go forward. What I want to do, today, is to describe what Haskell programmers have been using extension for. This is meant to be purely a description, without judgement on whether the proposed use-cases are good ideas. When the use-cases are listed, we'll turn to which we want to support and how.
Without further ado, here is a list of use-cases, based on Adam's list (my rephrasing), with additions by me. Haskell programmers use extensions to:
1. Gain early access to experimental or unstable features (e.g. because they're working on a research prototype, or because the feature is valuable enough to them to forgo some stability) 2. Restrict the use of more complex features (e.g. for easier onboarding of new developers or as educators to teach a well-delimited subset of the language) 3. As library authors, to signal which features the library actually uses, hence which version of GHC the library is compatible with. 4. Retain access to deprecated features to smooth out migration over the deprecation period. 5. Retain access to deprecated features indefinitely. 6. Change the default behaviour of (part of) the language (e.g. StrictData, I think some of the dependent Haskell work falls in this category, but I can't pinpoint an example) 7. Extend the language in a way that is not backward compatible (e.g. OverloadedList, probably some dependent Haskell things too) 8. Enable features whose mere presence has a performance impact (e.g. Template Haskell, and that's probably it) 9. CPP (this one is very unique isn't it?)
(Note: Adam proposed some use-cases which are not included here: using extension to ensure stability (which is the contrapositive of 1), and as a GHC dev, make features available to early adopters (which is the dual of 1). I didn't include them because I consider that they are contained in 1, but if you disagree, please argue otherwise)
Questions: 1. Have we missed some use-cases, if so describe? (I'm sure we have, so I'd be surprised if nothing turns up here) 2. Do you think some of the use-cases above should be split into several use-cases? 3. Conversely, are there distinctions that don't make sense to you and you would argue should be merged?
Before answering, take note that while some of the proposed use-cases can be seen as a list of extensions that behave a certain way, some extensions may be used in several use-cases (4 and 5, by definition concern the same set of extensions), some use-cases (like 3) are independent of the behaviour of extensions. This is not a classification of extension, but of how they are consumed.
I'll tally the result on Tuesday 10th April.
Best, Arnaud _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee

As Joachim says, "Programmers use extensions to _refer_ to a particular feature when talking/writing/searching about it." I think this is generally important. The language reports provide the foundations for understanding the language and it is important to have a handle to describe the various departures from it -- at least until a new report around which near universal acceptance can be established. I would extend "2. Restrict the use of more complex features" to say "2. Restrict the use of _novel_ and more complex features". I think many just want to say exactly how they are departing from Haskell 2010, whether those deltas are complex or otherwise. Chris

(sorry, it's been a busy week, next email thread comes out today, or tomorrow at the latest) Joachim:
From a user-point of view, it seems you could possible merge 1, 4, 5, 6, 7 and 8 as “Developer wants access to features not on by default”. The developer probably doesn’t really care _why_ the extension is not on by default, they just want to use it when they want to use it :).
At the end of the day, an extension is either a feature that is off by
default and can be turned on, or on by default and can be turned off. I
don't think we've said much when we've reduced the users' behaviour to that
level. So I wanted this list to be specifically about the why. And I think
the users do care. GHC Proposals say “I want a new extension to support X”,
I wanted to be as exhaustive as possible to then be able to try and then
delineate the X-s that we intend language extensions to support.
On Fri, 7 Apr 2023 at 17:33, Chris Dornan
As Joachim says, "Programmers use extensions to _refer_ to a particular feature when talking/writing/searching about it."
I think this is generally important. The language reports provide the foundations for understanding the language and it is important to have a handle to describe the various departures from it -- at least until a new report around which near universal acceptance can be established.
I would extend "2. Restrict the use of more complex features" to say "2. Restrict the use of _novel_ and more complex features". I think many just want to say exactly how they are departing from Haskell 2010, whether those deltas are complex or otherwise.
Chris

While I'm typing my next round of questions, and based on the feedback in
this thread, here is the list of use-cases that I could gather.
1. Gain early access to experimental or unstable features
(e.g. because they're working on a research prototype, or because
the feature is valuable enough to them to forgo some stability)
2. Restrict the use of more complex features (e.g. for easier
onboarding of new developers or as educators to teach a
well-delimited subset of the language)
3. Restrict the use of novel features since the last established
standard/report.
4. Restrict the use to features that they don't like (e.g. controversial
features like RecordWildcard or ImplicitParameters)
5. Name/refer to a particular feature when talking/writing/searching
about it.
6. Restrict the use of features which require support from outside
the Haskell ecosystem that can't be taken for granted (I think this
concerns only UnicodeSyntax)
7. As library authors, to signal which features the library actually
uses, hence which version of GHC the library is compatible with.
8. Retain access to deprecated features to smooth out migration over
the deprecation period.
9. Retain access to deprecated features indefinitely.
10. Change the default behaviour of (part of) the language
(e.g. StrictData, I think some of the dependent Haskell work falls
in this category, but I can't pinpoint an example)
11. Extend the language in a way that is not backward compatible
(e.g. OverloadedList, probably some dependent Haskell things too)
12. Enable features whose mere presence has a performance impact
(e.g. Template Haskell, and that's probably it)
13. CPP (this one is very unique isn't it?)
On Mon, 17 Apr 2023 at 09:02, Arnaud Spiwack
(sorry, it's been a busy week, next email thread comes out today, or tomorrow at the latest)
Joachim:
From a user-point of view, it seems you could possible merge 1, 4, 5, 6, 7 and 8 as “Developer wants access to features not on by default”. The developer probably doesn’t really care _why_ the extension is not on by default, they just want to use it when they want to use it :).
At the end of the day, an extension is either a feature that is off by default and can be turned on, or on by default and can be turned off. I don't think we've said much when we've reduced the users' behaviour to that level. So I wanted this list to be specifically about the why. And I think the users do care. GHC Proposals say “I want a new extension to support X”, I wanted to be as exhaustive as possible to then be able to try and then delineate the X-s that we intend language extensions to support.
On Fri, 7 Apr 2023 at 17:33, Chris Dornan
wrote: As Joachim says, "Programmers use extensions to _refer_ to a particular feature when talking/writing/searching about it."
I think this is generally important. The language reports provide the foundations for understanding the language and it is important to have a handle to describe the various departures from it -- at least until a new report around which near universal acceptance can be established.
I would extend "2. Restrict the use of more complex features" to say "2. Restrict the use of _novel_ and more complex features". I think many just want to say exactly how they are departing from Haskell 2010, whether those deltas are complex or otherwise.
Chris
participants (5)
-
Arnaud Spiwack
-
Chris Dornan
-
Joachim Breitner
-
Simon Marlow
-
Simon Peyton Jones