LAST CALL to comment on the Appicative/Monad Proposal

The very first RFC created (https://github.com/haskell/rfcs/pull/1), the Applicative/Monad Proposal, has now reached the Last Call stage. In order to ground the discussion, I have taken some time to update the Prelude and the text of the Haskell Report with its effects before the call. The rendered report is available at https://github.com/blamario/rfcs/blob/amp/report/report/haskell.pdf for your review. TL;DR: The proposed changes to the report add the latest design of the Applicative and Alternative classes, but otherwise are intentionally minimal. Any further modifications, like the MonadFail proposal or moving return out of the Monad class, should be relegated to new RFCs. In some more detail, the changes are: 1. Applicative has been added as a subclass of Functor and superclass of Monad, its methods and laws as currently defined in the base library. The class and all its methods (pure, (<*>), (<*), (*>), and liftA2) are exported from Prelude, but no other Applicative-related functions (like liftA3) are. 2. The Functor class definition has been moved from module Control.Monad to Control.Applicative in order to avoid circular imports. Note that neither module is a part of the language specification. 3. The Monad class has been left unmodified, apart from making Applicative its superclass and adding return a == pure a as a law. 4. Alternative has been added to the Control.Applicative module, but not to Prelude. This is the same treatment already meted to MonadPlus. I'm unsure why MonadPlus even exists in the report, as it has no relevance to the language specification, and I would gladly remove both classes. Please take some time within the following three weeks (including some extra allowance for the upcoming holiday breaks) to vote for or against the proposal, or to leave a comment with suggestions for its improvement.

While you're reviewing AMP, please take a bit of time to also comment on the related new MonadPlus excise proposal at https://github.com/haskell/rfcs/pull/23 The proposal is very short so it should be an easy decision. Thank you. On 2018-12-15 6:46 p.m., Mario Blažević wrote:
The very first RFC created (https://github.com/haskell/rfcs/pull/1), the Applicative/Monad Proposal, has now reached the Last Call stage. In order to ground the discussion, I have taken some time to update the Prelude and the text of the Haskell Report with its effects before the call. The rendered report is available at https://github.com/blamario/rfcs/blob/amp/report/report/haskell.pdf for your review.
TL;DR:
The proposed changes to the report add the latest design of the Applicative and Alternative classes, but otherwise are intentionally minimal. Any further modifications, like the MonadFail proposal or moving return out of the Monad class, should be relegated to new RFCs.
In some more detail, the changes are:
1. Applicative has been added as a subclass of Functor and superclass of Monad, its methods and laws as currently defined in the base library. The class and all its methods (pure, (<*>), (<*), (*>), and liftA2) are exported from Prelude, but no other Applicative-related functions (like liftA3) are.
2. The Functor class definition has been moved from module Control.Monad to Control.Applicative in order to avoid circular imports. Note that neither module is a part of the language specification.
3. The Monad class has been left unmodified, apart from making Applicative its superclass and adding return a == pure a as a law.
4. Alternative has been added to the Control.Applicative module, but not to Prelude. This is the same treatment already meted to MonadPlus. I'm unsure why MonadPlus even exists in the report, as it has no relevance to the language specification, and I would gladly remove both classes.
Please take some time within the following three weeks (including some extra allowance for the upcoming holiday breaks) to vote for or against the proposal, or to leave a comment with suggestions for its improvement.
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

Hello Mario et al.,
On Tue, Dec 18, 2018 at 4:17 AM Mario Blažević
While you're reviewing AMP, please take a bit of time to also comment on the related new MonadPlus excise proposal at https://github.com/haskell/rfcs/pull/23
The proposal is very short so it should be an easy decision. Thank you.
As I've explained already on the RFC, I refuse (i.e. to make this very clear: I'm exercising my veto) to accept the AMP change without also at least a commitment to MFP and MRP. And note that the committee was created with the explicit request from SPJ that it ought to be a consensus-based decision process rather than a democratic voting process -- and there isn't consensus in this matter as far as I'm concerned. The discussion started on the right foot with Richard rightly saying
The redundant functions (like return) are all well and good in an implementation such as GHC, but I think they should be struck from the Report. Let's design it like we should have from the beginning, cleanly. GHC could then include its non-conformance with this new standard as an infelicity. Perhaps GHC can even deprecate return, but I don't have a problem with just living with the infelicity.
That's the ideal we should strive for and what I expected the discussion to follow-through but unfortunately it got lost along the way. Herbert

Hi all, Well, I am in favour of discussing AMP and MRP separately because: a) As far as I am aware, there is no compelling *technical* reason for not doing so. b) On balance, this is the path most likely to result in some progress on this issue. Of course, if there *is* a fundamental technical reason for why the AMP, MFP, and MRP all *must* be discussed together, then please put this forward. As to the underlying issue, I don't agree that AMP on its own somehow is not "clean". But of course, design is something where reasonable people may choose to disagree. (Which in itself strongly suggests that it makes sense to strive to consider technically independent proposals separately.) The rationale for my position is: a) The remaining legacy issues raised by MRP significantly outweighs any technical benefits. b) Keeping "return" as a monadic *method* would in principle (through a minor language extension that has been proposed separately for different reasons) allow both Functor and Applicative instances to be defined in terms of a Monad instance. The latter is really useful in a situation where one genuinely only cares about the monad, makes perfect sense mathematically of course, and would go a long way towards alleviating the genuine difficulties of teaching monads that AMP did bring about, as reported by a number of *very* experienced educators. But clearly this is a separate discussion. Which is why AMP, MRP, and MFP should be considered separately. One high-level perspective on this is the well-established possibility in Haskell of defining an instance of a class by only giving definitions of a subset of its methods where methods are interdefinable. Many methods in the Functor/Monad/Applicative hierarchy are similarly interdefinable, but spread over more than one class. But in principle, choosing to define e.g. "fmap" in terms of the monadic methods, or "pure" in terms of "return", or vice versa for that matter, is not very different from the choice between defining a monad in terms of bind or join. Best, /Henrik This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law.

On 18/12/2018 12:23, Henrik Nilsson wrote:
Hi all,
Well, I am in favour of discussing AMP and MRP separately
Whoops, my bad, wasn't familiar enough to realise my suggestion was effectively covered by MRP! I think it might be a legitimate thing to tease do-uses-*> apart from MRP-as-a-whole as it only affects do notation and is already justifiable in terms of AMP's rationale alone, but I'll entirely understand if it's a bigger can of worms than is worth it at this point. That said, if there's any appetite for it we could ask for the relevant toggles to be added to GHC and gather some data, possibly branching this off as an AMP-or-MRP thing? As I've said, I have a use case for it today and in the absence of other extensions or alterations. It's a lot easier to estimate ecosystem impact given a switch that'll find all the resulting errors and give everyone a chance to fail any tests.

Hi, Philippa wrote:
It's a lot easier to estimate ecosystem impact given a switch that'll find all the resulting errors and give everyone a chance to fail any tests.
Yes, a good point. But just to be clear, the impact of some changes go well beyond what can be assessed by looking at impact on an existing code base alone. And that is one reason for why MRP has been, and remains, so controversial. Best, /Henrik This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law.

On 18/12/2018 13:41, Henrik Nilsson wrote:
Hi,
Philippa wrote:
It's a lot easier to estimate ecosystem impact given a switch that'll find all the resulting errors and give everyone a chance to fail any tests.
Yes, a good point.
But just to be clear, the impact of some changes go well beyond what can be assessed by looking at impact on an existing code base alone. And that is one reason for why MRP has been, and remains, so controversial.
Sure. I think the one conceptual shift do-uses-*> would create is that do notation no longer (except in the degenerate tail case) always brings a Monad constraint, instead it would bring Applicative unless something is bound with <-. If I'm right then that's certainly a long way short of MRP per se, which I'm not interested in discussing at this point :) I'm not sure how much of a problem that would create for teachers - I imagine it depends very much on one's style, as it can even reinforce the idea that Monad is partly about (unconstrained) binding! Which is a plus if you like making the connection to ANF to some extent and letting people think about a family of machine models. I think that's something it might even be nice to let students play with in some circumstances? Though I've done all my teaching 1:1 or with very small groups myself and generally not to first year undergraduates. Nor have I seen how AMP is affecting teaching in general properly. Certainly something I'd be happy to talk about more if and when there's time - realistically there's no good reason to hold up AMP over this when it could be treated as a third proposal which depends on AMP and which MRP mandates. Should I find a TLA for it? Is there somewhere else I should be pasting my thoughts here to? Any other comments? If I'm wasting people's time I'd rather stop, but if this is a viable proposal refactoring that might be another matter. Cheers, Philippa

I've added the gist of this to the relevant github thread. I've been clear that I don't consider it a blocker for the proposals. On 18/12/2018 14:45, Philippa Cowderoy wrote:
On 18/12/2018 13:41, Henrik Nilsson wrote:
Hi,
Philippa wrote:
It's a lot easier to estimate ecosystem impact given a switch that'll find all the resulting errors and give everyone a chance to fail any tests.
Yes, a good point.
But just to be clear, the impact of some changes go well beyond what can be assessed by looking at impact on an existing code base alone. And that is one reason for why MRP has been, and remains, so controversial.
Sure. I think the one conceptual shift do-uses-*> would create is that do notation no longer (except in the degenerate tail case) always brings a Monad constraint, instead it would bring Applicative unless something is bound with <-. If I'm right then that's certainly a long way short of MRP per se, which I'm not interested in discussing at this point :)
I'm not sure how much of a problem that would create for teachers - I imagine it depends very much on one's style, as it can even reinforce the idea that Monad is partly about (unconstrained) binding! Which is a plus if you like making the connection to ANF to some extent and letting people think about a family of machine models. I think that's something it might even be nice to let students play with in some circumstances? Though I've done all my teaching 1:1 or with very small groups myself and generally not to first year undergraduates. Nor have I seen how AMP is affecting teaching in general properly.
Certainly something I'd be happy to talk about more if and when there's time - realistically there's no good reason to hold up AMP over this when it could be treated as a third proposal which depends on AMP and which MRP mandates. Should I find a TLA for it?
Is there somewhere else I should be pasting my thoughts here to? Any other comments? If I'm wasting people's time I'd rather stop, but if this is a viable proposal refactoring that might be another matter.
Cheers, Philippa
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

On 2018-12-18 2:38 a.m., Herbert Valerio Riedel wrote:
Hello Mario et al.,
On Tue, Dec 18, 2018 at 4:17 AM Mario Blažević
wrote: While you're reviewing AMP, please take a bit of time to also comment on the related new MonadPlus excise proposal at https://github.com/haskell/rfcs/pull/23
The proposal is very short so it should be an easy decision. Thank you.
As I've explained already on the RFC, I refuse (i.e. to make this very clear: I'm exercising my veto) to accept the AMP change without also at least a commitment to MFP and MRP. And note that the committee was created with the explicit request from SPJ that it ought to be a consensus-based decision process rather than a democratic voting process -- and there isn't consensus in this matter as far as I'm concerned.
What exactly would you consider "a commitment to MFP and MRP"? As for myself, they are both on my to-do list. I just don't want to get lost in endless discussions without having anything done, so I performed the first step, the AMP. If that is accepted, I fully intend to prepare both MFP and MRP proposals - unless somebody else does it first. Is that commitment enough?

On 18/12/2018 07:38, Herbert Valerio Riedel wrote:
Hello Mario et al.,
While you're reviewing AMP, please take a bit of time to also comment on the related new MonadPlus excise proposal at https://github.com/haskell/rfcs/pull/23
The proposal is very short so it should be an easy decision. Thank you. As I've explained already on the RFC, I refuse (i.e. to make this very clear: I'm exercising my veto) to accept the AMP change without also at least a commitment to MFP and MRP. And note that the committee was created with the explicit request from SPJ that it ought to be a consensus-based decision process rather than a democratic voting
On Tue, Dec 18, 2018 at 4:17 AM Mario Blažević
wrote: process -- and there isn't consensus in this matter as far as I'm concerned.
To be clear: you would prefer the Report's status quo to AMP without MFP and MRP? Because that looks likely to be where we're headed unless we wait out GHC implementing both and see if everyone is resigned to that result.

I'm having a moment of fail trying to work out how to leave a comment. Is there a reason (other than GHC not doing it yet) not to have do notation use *> instead of >> in line with using the least restrictive function? I have some otherwise-nice logic programming code that would actively benefit from it and it seems like a missing step from here. On 15/12/2018 23:46, Mario Blažević wrote:
The very first RFC created (https://github.com/haskell/rfcs/pull/1), the Applicative/Monad Proposal, has now reached the Last Call stage. In order to ground the discussion, I have taken some time to update the Prelude and the text of the Haskell Report with its effects before the call. The rendered report is available at https://github.com/blamario/rfcs/blob/amp/report/report/haskell.pdf for your review.
TL;DR:
The proposed changes to the report add the latest design of the Applicative and Alternative classes, but otherwise are intentionally minimal. Any further modifications, like the MonadFail proposal or moving return out of the Monad class, should be relegated to new RFCs.
In some more detail, the changes are:
1. Applicative has been added as a subclass of Functor and superclass of Monad, its methods and laws as currently defined in the base library. The class and all its methods (pure, (<*>), (<*), (*>), and liftA2) are exported from Prelude, but no other Applicative-related functions (like liftA3) are.
2. The Functor class definition has been moved from module Control.Monad to Control.Applicative in order to avoid circular imports. Note that neither module is a part of the language specification.
3. The Monad class has been left unmodified, apart from making Applicative its superclass and adding return a == pure a as a law.
4. Alternative has been added to the Control.Applicative module, but not to Prelude. This is the same treatment already meted to MonadPlus. I'm unsure why MonadPlus even exists in the report, as it has no relevance to the language specification, and I would gladly remove both classes.
Please take some time within the following three weeks (including some extra allowance for the upcoming holiday breaks) to vote for or against the proposal, or to leave a comment with suggestions for its improvement.
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

Is it just me, or is all the discussion in these threads much more easily
resolved if the Report is simply a report? Describe what is, rather than
what you wish it was, and there's much less room for disagreement. A future
Report can describe the way that these things work differently in the
future when the changes actually happen in the implementation(s).
I don't know about anyone else, but at least from my perspective the value
of the Report is in being valid documentation. The extent to which it fails
to describe the actual family of languages we're presently writing code in
is the extent to which it is failing to be a useful resource for our daily
lives.
I dunno, I feel kind of strange when people talk about removing 'return'
for example, since it's very unlikely to go anywhere any time soon given
how much code it is referenced in. It would be practically unreasonable
even to try to deprecate it. Given that the Report is going to discuss this
part of the language, it makes sense that it should be documented.
Secondarily, it's a bit hard to describe why this is, but I personally find
it a bit obnoxious whenever someone uses 'pure' rather than 'return' if the
functor is known to be an instance of Monad and the generality isn't
needed. It's a kind of signal that the code we're writing is (and perhaps
needs to be) Applicative-polymorphic, or that we lack a Monad instance. So
when I see it, I'm forced to consider for a moment why that might be, and
whether I've understood the context incorrectly (and if it's not the case,
that's sort of irritating).
So when I see a suggestion to remove 'return' altogether it's sort of like
"let's make everything mildly annoying to read forever" (by forcing this
thought about exactly how general the code is, and making it slightly
harder to guess the types at a glance).
It's like while pure and return are equal whenever they would both
typecheck, they've come to have very different connotations about the
surrounding code.
On Tue, Dec 18, 2018, 05:42 Philippa Cowderoy,
I'm having a moment of fail trying to work out how to leave a comment.
Is there a reason (other than GHC not doing it yet) not to have do notation use *> instead of >> in line with using the least restrictive function? I have some otherwise-nice logic programming code that would actively benefit from it and it seems like a missing step from here.
On 15/12/2018 23:46, Mario Blažević wrote:
The very first RFC created (https://github.com/haskell/rfcs/pull/1), the Applicative/Monad Proposal, has now reached the Last Call stage. In order to ground the discussion, I have taken some time to update the Prelude and the text of the Haskell Report with its effects before the call. The rendered report is available at https://github.com/blamario/rfcs/blob/amp/report/report/haskell.pdf for your review.
TL;DR:
The proposed changes to the report add the latest design of the Applicative and Alternative classes, but otherwise are intentionally minimal. Any further modifications, like the MonadFail proposal or moving return out of the Monad class, should be relegated to new RFCs.
In some more detail, the changes are:
1. Applicative has been added as a subclass of Functor and superclass of Monad, its methods and laws as currently defined in the base library. The class and all its methods (pure, (<*>), (<*), (*>), and liftA2) are exported from Prelude, but no other Applicative-related functions (like liftA3) are.
2. The Functor class definition has been moved from module Control.Monad to Control.Applicative in order to avoid circular imports. Note that neither module is a part of the language specification.
3. The Monad class has been left unmodified, apart from making Applicative its superclass and adding return a == pure a as a law.
4. Alternative has been added to the Control.Applicative module, but not to Prelude. This is the same treatment already meted to MonadPlus. I'm unsure why MonadPlus even exists in the report, as it has no relevance to the language specification, and I would gladly remove both classes.
Please take some time within the following three weeks (including some extra allowance for the upcoming holiday breaks) to vote for or against the proposal, or to leave a comment with suggestions for its improvement.
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

Getting to ditch a similar connotation in do notation is exactly why I've started this thread, of course! Some instances are far less about having pure/return, at least without some more powerful constructs we can't have in a standardised Haskell just yet. It's maybe a personal irritation that ApplicativeDo outright fails in that situation. I was slightly appalled when I realised just now what pronunciations of *> and <* I could most easily justify if nobody else comes up with a suggestion - I think <* might be "klap". I do think there's value in wondering whether there are small changes to GHC we might request if nobody else does it. But that's partly because the Report has to be descriptive by default - otherwise there's no good institutional eye on neatening things up over time that has an eye on standards rather than the concerns that drive GHC. Fundamentally, if I'd wanted to drag up MRP rather than round off an edge, I would've done so explicitly! If someone wants to tell me where to nag the GHC folks I guess I might find the time. But I'm definitely looking at removing warts in the context of things that are already happening myself. On 18/12/2018 14:52, Cale Gibbard wrote:
Is it just me, or is all the discussion in these threads much more easily resolved if the Report is simply a report? Describe what is, rather than what you wish it was, and there's much less room for disagreement. A future Report can describe the way that these things work differently in the future when the changes actually happen in the implementation(s).
I don't know about anyone else, but at least from my perspective the value of the Report is in being valid documentation. The extent to which it fails to describe the actual family of languages we're presently writing code in is the extent to which it is failing to be a useful resource for our daily lives.
I dunno, I feel kind of strange when people talk about removing 'return' for example, since it's very unlikely to go anywhere any time soon given how much code it is referenced in. It would be practically unreasonable even to try to deprecate it. Given that the Report is going to discuss this part of the language, it makes sense that it should be documented.
Secondarily, it's a bit hard to describe why this is, but I personally find it a bit obnoxious whenever someone uses 'pure' rather than 'return' if the functor is known to be an instance of Monad and the generality isn't needed. It's a kind of signal that the code we're writing is (and perhaps needs to be) Applicative-polymorphic, or that we lack a Monad instance. So when I see it, I'm forced to consider for a moment why that might be, and whether I've understood the context incorrectly (and if it's not the case, that's sort of irritating).
So when I see a suggestion to remove 'return' altogether it's sort of like "let's make everything mildly annoying to read forever" (by forcing this thought about exactly how general the code is, and making it slightly harder to guess the types at a glance).
It's like while pure and return are equal whenever they would both typecheck, they've come to have very different connotations about the surrounding code.
On Tue, Dec 18, 2018, 05:42 Philippa Cowderoy,
mailto:flippa@flippac.org> wrote: I'm having a moment of fail trying to work out how to leave a comment.
Is there a reason (other than GHC not doing it yet) not to have do notation use *> instead of >> in line with using the least restrictive function? I have some otherwise-nice logic programming code that would actively benefit from it and it seems like a missing step from here.
On 15/12/2018 23:46, Mario Blažević wrote: > The very first RFC created (https://github.com/haskell/rfcs/pull/1), > the Applicative/Monad Proposal, has now reached the Last Call stage. > In order to ground the discussion, I have taken some time to update > the Prelude and the text of the Haskell Report with its effects before > the call. The rendered report is available at > https://github.com/blamario/rfcs/blob/amp/report/report/haskell.pdf > for your review. > > > TL;DR: > > The proposed changes to the report add the latest design of the > Applicative and Alternative classes, but otherwise are intentionally > minimal. Any further modifications, like the MonadFail proposal or > moving return out of the Monad class, should be relegated to new RFCs. > > > In some more detail, the changes are: > > 1. Applicative has been added as a subclass of Functor and superclass > of Monad, its methods and laws as currently defined in the base > library. The class and all its methods (pure, (<*>), (<*), (*>), and > liftA2) are exported from Prelude, but no other Applicative-related > functions (like liftA3) are. > > 2. The Functor class definition has been moved from module > Control.Monad to Control.Applicative in order to avoid circular > imports. Note that neither module is a part of the language > specification. > > 3. The Monad class has been left unmodified, apart from making > Applicative its superclass and adding return a == pure a as a law. > > 4. Alternative has been added to the Control.Applicative module, but > not to Prelude. This is the same treatment already meted to MonadPlus. > I'm unsure why MonadPlus even exists in the report, as it has no > relevance to the language specification, and I would gladly remove > both classes. > > > Please take some time within the following three weeks (including some > extra allowance for the upcoming holiday breaks) to vote for or > against the proposal, or to leave a comment with suggestions for its > improvement. > > > _______________________________________________ > Haskell-prime mailing list > Haskell-prime@haskell.org mailto:Haskell-prime@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org mailto:Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

I guess I didn't mean to pick on your suggestion exactly -- the comments on
the pull request triggered my remark even moreso, but I was on my phone and
it was slightly easier to reply here.
Where I work, we've come to calling <$ "ice cream cone", so perhaps <* is
"snow cone", lol.
It's definitely valuable to think about and discuss where the language
might go, but every time I see that discussion in the context of producing
the Haskell Report, I think about how H2010 went almost nowhere because of
how this kind of discussion makes it easy to not decide on what any
particular change to the Report might be, and sort of wish that we had a
Report which was current at all...
On Tue, 18 Dec 2018 at 10:07 Philippa Cowderoy
Getting to ditch a similar connotation in do notation is exactly why I've started this thread, of course! Some instances are far less about having pure/return, at least without some more powerful constructs we can't have in a standardised Haskell just yet. It's maybe a personal irritation that ApplicativeDo outright fails in that situation.
I was slightly appalled when I realised just now what pronunciations of *> and <* I could most easily justify if nobody else comes up with a suggestion - I think <* might be "klap".
I do think there's value in wondering whether there are small changes to GHC we might request if nobody else does it. But that's partly because the Report has to be descriptive by default - otherwise there's no good institutional eye on neatening things up over time that has an eye on standards rather than the concerns that drive GHC.
Fundamentally, if I'd wanted to drag up MRP rather than round off an edge, I would've done so explicitly! If someone wants to tell me where to nag the GHC folks I guess I might find the time. But I'm definitely looking at removing warts in the context of things that are already happening myself. On 18/12/2018 14:52, Cale Gibbard wrote:
Is it just me, or is all the discussion in these threads much more easily resolved if the Report is simply a report? Describe what is, rather than what you wish it was, and there's much less room for disagreement. A future Report can describe the way that these things work differently in the future when the changes actually happen in the implementation(s).
I don't know about anyone else, but at least from my perspective the value of the Report is in being valid documentation. The extent to which it fails to describe the actual family of languages we're presently writing code in is the extent to which it is failing to be a useful resource for our daily lives.
I dunno, I feel kind of strange when people talk about removing 'return' for example, since it's very unlikely to go anywhere any time soon given how much code it is referenced in. It would be practically unreasonable even to try to deprecate it. Given that the Report is going to discuss this part of the language, it makes sense that it should be documented.
Secondarily, it's a bit hard to describe why this is, but I personally find it a bit obnoxious whenever someone uses 'pure' rather than 'return' if the functor is known to be an instance of Monad and the generality isn't needed. It's a kind of signal that the code we're writing is (and perhaps needs to be) Applicative-polymorphic, or that we lack a Monad instance. So when I see it, I'm forced to consider for a moment why that might be, and whether I've understood the context incorrectly (and if it's not the case, that's sort of irritating).
So when I see a suggestion to remove 'return' altogether it's sort of like "let's make everything mildly annoying to read forever" (by forcing this thought about exactly how general the code is, and making it slightly harder to guess the types at a glance).
It's like while pure and return are equal whenever they would both typecheck, they've come to have very different connotations about the surrounding code.
On Tue, Dec 18, 2018, 05:42 Philippa Cowderoy,
wrote: I'm having a moment of fail trying to work out how to leave a comment.
Is there a reason (other than GHC not doing it yet) not to have do notation use *> instead of >> in line with using the least restrictive function? I have some otherwise-nice logic programming code that would actively benefit from it and it seems like a missing step from here.
On 15/12/2018 23:46, Mario Blažević wrote:
The very first RFC created (https://github.com/haskell/rfcs/pull/1), the Applicative/Monad Proposal, has now reached the Last Call stage. In order to ground the discussion, I have taken some time to update the Prelude and the text of the Haskell Report with its effects before the call. The rendered report is available at https://github.com/blamario/rfcs/blob/amp/report/report/haskell.pdf for your review.
TL;DR:
The proposed changes to the report add the latest design of the Applicative and Alternative classes, but otherwise are intentionally minimal. Any further modifications, like the MonadFail proposal or moving return out of the Monad class, should be relegated to new RFCs.
In some more detail, the changes are:
1. Applicative has been added as a subclass of Functor and superclass of Monad, its methods and laws as currently defined in the base library. The class and all its methods (pure, (<*>), (<*), (*>), and liftA2) are exported from Prelude, but no other Applicative-related functions (like liftA3) are.
2. The Functor class definition has been moved from module Control.Monad to Control.Applicative in order to avoid circular imports. Note that neither module is a part of the language specification.
3. The Monad class has been left unmodified, apart from making Applicative its superclass and adding return a == pure a as a law.
4. Alternative has been added to the Control.Applicative module, but not to Prelude. This is the same treatment already meted to MonadPlus. I'm unsure why MonadPlus even exists in the report, as it has no relevance to the language specification, and I would gladly remove both classes.
Please take some time within the following three weeks (including some extra allowance for the upcoming holiday breaks) to vote for or against the proposal, or to leave a comment with suggestions for its improvement.
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

Not taken personally, don't worry. You've done enough picking up where I've failed to get work done over the years, too! I'm trying to be deliberate about "this does raise this issue but it isn't a blocker and can be separated out" pretty much precisely so I can be cheerfully ignored if nobody else cares. I may have tweeted some minor irritation about how when it comes to my code, ApplicativeDo fails to give a, er, *> though :) <$ could reasonably be rebound to |- in some of my code, and the main reason I don't is I'm using it to implement a type system which has its own turnstile. Which I'm pretty sure I told you years ago, but it may be mildly new to others here. On 18/12/2018 15:15, Cale Gibbard wrote:
I guess I didn't mean to pick on your suggestion exactly -- the comments on the pull request triggered my remark even moreso, but I was on my phone and it was slightly easier to reply here.
Where I work, we've come to calling <$ "ice cream cone", so perhaps <* is "snow cone", lol.
It's definitely valuable to think about and discuss where the language might go, but every time I see that discussion in the context of producing the Haskell Report, I think about how H2010 went almost nowhere because of how this kind of discussion makes it easy to not decide on what any particular change to the Report might be, and sort of wish that we had a Report which was current at all...
On Tue, 18 Dec 2018 at 10:07 Philippa Cowderoy
mailto:flippa@flippac.org> wrote: Getting to ditch a similar connotation in do notation is exactly why I've started this thread, of course! Some instances are far less about having pure/return, at least without some more powerful constructs we can't have in a standardised Haskell just yet. It's maybe a personal irritation that ApplicativeDo outright fails in that situation.
I was slightly appalled when I realised just now what pronunciations of *> and <* I could most easily justify if nobody else comes up with a suggestion - I think <* might be "klap".
I do think there's value in wondering whether there are small changes to GHC we might request if nobody else does it. But that's partly because the Report has to be descriptive by default - otherwise there's no good institutional eye on neatening things up over time that has an eye on standards rather than the concerns that drive GHC.
Fundamentally, if I'd wanted to drag up MRP rather than round off an edge, I would've done so explicitly! If someone wants to tell me where to nag the GHC folks I guess I might find the time. But I'm definitely looking at removing warts in the context of things that are already happening myself.
On 18/12/2018 14:52, Cale Gibbard wrote:
Is it just me, or is all the discussion in these threads much more easily resolved if the Report is simply a report? Describe what is, rather than what you wish it was, and there's much less room for disagreement. A future Report can describe the way that these things work differently in the future when the changes actually happen in the implementation(s).
I don't know about anyone else, but at least from my perspective the value of the Report is in being valid documentation. The extent to which it fails to describe the actual family of languages we're presently writing code in is the extent to which it is failing to be a useful resource for our daily lives.
I dunno, I feel kind of strange when people talk about removing 'return' for example, since it's very unlikely to go anywhere any time soon given how much code it is referenced in. It would be practically unreasonable even to try to deprecate it. Given that the Report is going to discuss this part of the language, it makes sense that it should be documented.
Secondarily, it's a bit hard to describe why this is, but I personally find it a bit obnoxious whenever someone uses 'pure' rather than 'return' if the functor is known to be an instance of Monad and the generality isn't needed. It's a kind of signal that the code we're writing is (and perhaps needs to be) Applicative-polymorphic, or that we lack a Monad instance. So when I see it, I'm forced to consider for a moment why that might be, and whether I've understood the context incorrectly (and if it's not the case, that's sort of irritating).
So when I see a suggestion to remove 'return' altogether it's sort of like "let's make everything mildly annoying to read forever" (by forcing this thought about exactly how general the code is, and making it slightly harder to guess the types at a glance).
It's like while pure and return are equal whenever they would both typecheck, they've come to have very different connotations about the surrounding code.
On Tue, Dec 18, 2018, 05:42 Philippa Cowderoy,
mailto:flippa@flippac.org> wrote: I'm having a moment of fail trying to work out how to leave a comment.
Is there a reason (other than GHC not doing it yet) not to have do notation use *> instead of >> in line with using the least restrictive function? I have some otherwise-nice logic programming code that would actively benefit from it and it seems like a missing step from here.
On 15/12/2018 23:46, Mario Blažević wrote: > The very first RFC created (https://github.com/haskell/rfcs/pull/1), > the Applicative/Monad Proposal, has now reached the Last Call stage. > In order to ground the discussion, I have taken some time to update > the Prelude and the text of the Haskell Report with its effects before > the call. The rendered report is available at > https://github.com/blamario/rfcs/blob/amp/report/report/haskell.pdf
> for your review. > > > TL;DR: > > The proposed changes to the report add the latest design of the > Applicative and Alternative classes, but otherwise are intentionally > minimal. Any further modifications, like the MonadFail proposal or > moving return out of the Monad class, should be relegated to new RFCs. > > > In some more detail, the changes are: > > 1. Applicative has been added as a subclass of Functor and superclass > of Monad, its methods and laws as currently defined in the base > library. The class and all its methods (pure, (<*>), (<*), (*>), and > liftA2) are exported from Prelude, but no other Applicative-related > functions (like liftA3) are. > > 2. The Functor class definition has been moved from module > Control.Monad to Control.Applicative in order to avoid circular > imports. Note that neither module is a part of the language > specification. > > 3. The Monad class has been left unmodified, apart from making > Applicative its superclass and adding return a == pure a as a law. > > 4. Alternative has been added to the Control.Applicative module, but > not to Prelude. This is the same treatment already meted to MonadPlus. > I'm unsure why MonadPlus even exists in the report, as it has no > relevance to the language specification, and I would gladly remove > both classes. > > > Please take some time within the following three weeks (including some > extra allowance for the upcoming holiday breaks) to vote for or > against the proposal, or to leave a comment with suggestions for its > improvement. > > > _______________________________________________ > Haskell-prime mailing list > Haskell-prime@haskell.org mailto:Haskell-prime@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org mailto:Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

Hi, On 12/18/2018 02:52 PM, Cale Gibbard wrote:
Secondarily, it's a bit hard to describe why this is, but I personally find it a bit obnoxious whenever someone uses 'pure' rather than 'return' if the functor is known to be an instance of Monad and the generality isn't needed. It's a kind of signal that the code we're writing is (and perhaps needs to be) Applicative-polymorphic, or that we lack a Monad instance. So when I see it, I'm forced to consider for a moment why that might be, and whether I've understood the context incorrectly (and if it's not the case, that's sort of irritating).
So when I see a suggestion to remove 'return' altogether it's sort of like "let's make everything mildly annoying to read forever" (by forcing this thought about exactly how general the code is, and making it slightly harder to guess the types at a glance).
I personally fully agree with this sentiment: I do find the use of "pure" vs. "return" to be a very useful signal to the reader. Moreover, while there is little risk of confusion when arrow syntax is used, looking just at names, the fact is that the use of the distinct "returnA" also sends a similar signal to the reader, and consequently there is a certain consistency in distinct names being used for the three different computational notions for which (variations of) do-notation is provided. Best, /Henrik This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please contact the sender and delete the email and attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Email communications with the University of Nottingham may be monitored where permitted by law.

On 18/12/2018 18:02, Henrik Nilsson wrote:
Moreover, while there is little risk of confusion when arrow syntax is used, looking just at names, the fact is that the use of the distinct "returnA" also sends a similar signal to the reader, and consequently there is a certain consistency in distinct names being used for the three different computational notions for which (variations of) do-notation is provided.
I'm reminded that once upon a time I suggested what we now call ApplicativeDo start off with its own keyword for specifically Applicative code and that what it now tries to do might be possible! The lexical bikeshedding doesn't strike me as fun though.

A month passed since the last call, and I'm sorry to say that the Applicative/Monad proposal has been rejected. Herbert has vetoed it on the grounds that it doesn't come packaged with MonadFail and MonadOfNoReturn proposals. This is very unfortunate because (I thought) there was finally a glimmer of hope for Haskell 2020. The new process used to complete the RelaxedPolyRec proposal seemed promising, as it worked around the commitee's letargy problem. As it turns out, that wasn't the only problem. In all fairness, Herbert did state [1] he intends to write up the combination of AMP, MFP, and MNRP the way he likes it. I do hope that happens, but when and if he submits the combined proposal, I would not be surprised if, for example, Philippa should veto it on the grounds that it doesn't include the ApplicativeDo proposal that she's been vocal about. This committee is a far cry from the one that gave us Haskell '98. A Haskell 2020 report with no AMP would be pointless, in my opinion, so I'm going to suspend my work on the report until this issue is resolved. I still think the best course of action may be to disband the current disfunctional committee and form a new one, as I proposed [2] before establishing the new process. [1] https://github.com/haskell/rfcs/pull/1#issuecomment-448126690 [2] https://mail.haskell.org/pipermail/haskell-prime/2018-October/004370.html

Is there information anywhere on the process for acceptance/rejection
criteria. It sounds like hvr can outright reject any proposal - are there
others with that power? What is generally required for acceptance? Not
meant critically, just interested
On Wed, 16 Jan 2019, 8:01 pm Mario Blažević A month passed since the last call, and I'm sorry to say that the
Applicative/Monad proposal has been rejected. Herbert has vetoed it on
the grounds that it doesn't come packaged with MonadFail and
MonadOfNoReturn proposals. This is very unfortunate because (I thought) there was finally a glimmer
of hope for Haskell 2020. The new process used to complete the
RelaxedPolyRec proposal seemed promising, as it worked around the
commitee's letargy problem. As it turns out, that wasn't the only problem. In all fairness, Herbert did state [1] he intends to write up the
combination of AMP, MFP, and MNRP the way he likes it. I do hope that
happens, but when and if he submits the combined proposal, I would not
be surprised if, for example, Philippa should veto it on the grounds
that it doesn't include the ApplicativeDo proposal that she's been vocal
about. This committee is a far cry from the one that gave us Haskell '98. A Haskell 2020 report with no AMP would be pointless, in my opinion, so
I'm going to suspend my work on the report until this issue is resolved.
I still think the best course of action may be to disband the current
disfunctional committee and form a new one, as I proposed [2] before
establishing the new process. [1] https://github.com/haskell/rfcs/pull/1#issuecomment-448126690
[2]
https://mail.haskell.org/pipermail/haskell-prime/2018-October/004370.html _______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

On 2019-01-16 3:10 p.m., Oliver Charles wrote:
Is there information anywhere on the process for acceptance/rejection criteria. It sounds like hvr can outright reject any proposal - are there others with that power? What is generally required for acceptance? Not meant critically, just interested
Every active member of the commitee has that power. We could contemplate a different approach, like voting, if all members of the commitee were active. When you have only a couple of responses to a proposal, consensus among those who respond is the only possible way to go.
On Wed, 16 Jan 2019, 8:01 pm Mario Blažević
mailto:mblazevic@stilo.com wrote: A month passed since the last call, and I'm sorry to say that the Applicative/Monad proposal has been rejected. Herbert has vetoed it on the grounds that it doesn't come packaged with MonadFail and MonadOfNoReturn proposals.
This is very unfortunate because (I thought) there was finally a glimmer of hope for Haskell 2020. The new process used to complete the RelaxedPolyRec proposal seemed promising, as it worked around the commitee's letargy problem. As it turns out, that wasn't the only problem.
In all fairness, Herbert did state [1] he intends to write up the combination of AMP, MFP, and MNRP the way he likes it. I do hope that happens, but when and if he submits the combined proposal, I would not be surprised if, for example, Philippa should veto it on the grounds that it doesn't include the ApplicativeDo proposal that she's been vocal about. This committee is a far cry from the one that gave us Haskell '98.
A Haskell 2020 report with no AMP would be pointless, in my opinion, so I'm going to suspend my work on the report until this issue is resolved. I still think the best course of action may be to disband the current disfunctional committee and form a new one, as I proposed [2] before establishing the new process.
[1] https://github.com/haskell/rfcs/pull/1#issuecomment-448126690 [2] https://mail.haskell.org/pipermail/haskell-prime/2018-October/004370.html
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org mailto:Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
-- Mario Blazevic mblazevic@stilo.com Stilo International This message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, copying, or distribution is strictly prohibited. If you are not the intended recipient(s) please contact the sender by reply email and destroy all copies of the original message and any attachments.

I'm not committee, so I don't need to be part of any consensus. Myself I wouldn't bundle something I want up with something that's needed just to get it to pass anyway, for what it's worth. I'd rather keep my own ideas modular enough they don't bog anything down! So if I try to push my pet feature further it'll be its own proposal and I for one can't tie it to anything. But I certainly understand where you're coming from on this. I'm sorry if I've made things harder for you here, and I have to admit I had preferred that MFP and MNR wait their turn. I'm hoping that one way or another, Herbert's proposal means we reach some kind of conclusion in the long run - at the least, we will have two mutually-exclusive proposals on the table and an obligation to pick one, refine quickly or go home. I'd like to thank you for your work - myself I'm infamously unable to get things done (to the point of unemployability), and I've stayed off the committee precisely because I can appreciate the effort involved. On 16/01/2019 20:00, Mario Blažević wrote:
A month passed since the last call, and I'm sorry to say that the Applicative/Monad proposal has been rejected. Herbert has vetoed it on the grounds that it doesn't come packaged with MonadFail and MonadOfNoReturn proposals.
This is very unfortunate because (I thought) there was finally a glimmer of hope for Haskell 2020. The new process used to complete the RelaxedPolyRec proposal seemed promising, as it worked around the commitee's letargy problem. As it turns out, that wasn't the only problem.
In all fairness, Herbert did state [1] he intends to write up the combination of AMP, MFP, and MNRP the way he likes it. I do hope that happens, but when and if he submits the combined proposal, I would not be surprised if, for example, Philippa should veto it on the grounds that it doesn't include the ApplicativeDo proposal that she's been vocal about. This committee is a far cry from the one that gave us Haskell '98.
A Haskell 2020 report with no AMP would be pointless, in my opinion, so I'm going to suspend my work on the report until this issue is resolved. I still think the best course of action may be to disband the current disfunctional committee and form a new one, as I proposed [2] before establishing the new process.
[1] https://github.com/haskell/rfcs/pull/1#issuecomment-448126690 [2] https://mail.haskell.org/pipermail/haskell-prime/2018-October/004370.html
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

On 2019-01-16 3:26 p.m., Philippa Cowderoy wrote:
... I'd like to thank you for your work - myself I'm infamously unable to get things done (to the point of unemployability), and I've stayed off the committee precisely because I can appreciate the effort involved.
Apologies, for some reason I thought you were on the committee. Your self-description sounds like you'd fit right in.

On 17/01/2019 16:46, Mario Blažević wrote:
On 2019-01-16 3:26 p.m., Philippa Cowderoy wrote:
... I'd like to thank you for your work - myself I'm infamously unable to get things done (to the point of unemployability), and I've stayed off the committee precisely because I can appreciate the effort involved.
Apologies, for some reason I thought you were on the committee. Your self-description sounds like you'd fit right in.
I couldn't possibly comment! I'll admit it's left me with an eye for small-but-significant changes though. A lot of my wider involvement with the community has been of a more "social" nature, including my stint as Anglohaskell's meta-organiser and sometimes organiser, though I also mentored the Summer of Code project that got Parsec 3 off the ground once upon a time too. Thinking about it, that one does suggest I may have a talent for causing inevitable yet untold chaos! Perhaps that made it inevitable that someone would invite me onto this list in the dim and distant past? -- Philippa

On 16/01/2019 21.00, Mario Blažević wrote:
In all fairness, Herbert did state [1] he intends to write up the combination of AMP, MFP, and MNRP the way he likes it.
Did anything come of this? Regards,

Somehow every time I see messages from this list I'm again tempted to
suggest that it would all be so much easier if the goal were to document
the language as it exists in a fixed, already-released version of GHC. But
I'm not a member either. If I were, I'd pick a version and veto anything
which wasn't in that GHC. You could even pick a really old version of GHC
for this purpose and come out with a document that's far more relevant to
Haskell users of today than the Haskell 2010 Report. Just getting the
Report up to the point where it actually describes most of the stuff in GHC
6 would be fantastic progress, tbh.
Also I'd strongly consider just dropping the specification of the Prelude
altogether. I'm not sure it's even all that helpful to include it at this
point, given that whatever version someone is using is always going to have
Haddock documentation. It's both a point of contention, and of limited
usefulness to document.
On Sun, Mar 31, 2019, 12:02 Bardur Arantsson,
On 16/01/2019 21.00, Mario Blažević wrote:
In all fairness, Herbert did state [1] he intends to write up the combination of AMP, MFP, and MNRP the way he likes it.
Did anything come of this?
Regards,
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime

On 2019-03-31 at 18:02:13 +0200, Bardur Arantsson wrote:
In all fairness, Herbert did state [1] he intends to write up the combination of AMP, MFP, and MNRP the way he likes it.
Did anything come of this?
Actually yes! I started prototyping how the library-report modules could like like in H2020 as an actual working prototype (needs at least GHC 8.6, as only GHC 8.6 has the MonadFail desugaring properly setup to make this work seamlessly w/o the need for consumers to enable {-# LANGUAGE RebindableSyntax #-}): http://hackage.haskell.org/package/haskell2020 as this is the easiest way to empirically evaluate whether the big picture makes any sense; This is a real package with proper versioning that can be depended upon by other packages on Hackage; breaking changes will be signalled via major version bumps). This package can be used just like the old `haskell2010` was used, i.e. in your `.cabal` file you simply state build-depends: haskell2020 == 0.1.* and do *not* declare a dependency on the `base` package. Unfortunately I got distracted and haven't yet finished the delta to the library report for AMP+MRP. I hope to get back to it soon to tie this up. Best, Herbert
participants (8)
-
Bardur Arantsson
-
Cale Gibbard
-
Henrik Nilsson
-
Herbert Valerio Riedel
-
Mario Blažević
-
Mario Blažević
-
Oliver Charles
-
Philippa Cowderoy