[ghc-steering-committee] Proposal: Lazy unboxed tuples / warn on unbanged strict patterns (#35); Recommendation: Reject
Richard Eisenberg
rae at cs.brynmawr.edu
Fri Aug 17 16:10:40 UTC 2018
I worry that everyone has missed the final sentence of the proposal:
> This is already implemented, but it is easy enough to tweak the design.
This proposal is fully implemented in 8.4, and I believe it is, too, in 8.2. At the time the proposal was written, the new features had not been released, and it was hoped that the discussion would influence the design. But due to the fact that this was parked for so long, the implementation has since been released.
(Why the weird temporal ordering? Improvements around levity polymorphism that absolutely needed to get into 8.2 walked over this code. It was tangled and so I cleaned it up. It was only later that we recognized a proposal was in order.)
The big motivation for (A) is that it removes unboxed tuples (resp. sums) from being a special case. Now, we're uniform.
The big motivation for (B) is that it allows more (correct) programs to compile. The previous behavior was throwing out programs because GHC was worried that the author was being silly -- but that's precisely what warnings are good for.
Have I lost interest? Possibly. I've never cared all that deeply about this, other than that the code was quite hard to understand (and incorrect w.r.t. the manual) when I came across it. My lack of prodding on this issue was simply because the lack of an answer wasn't holding me up.
Richard
> On Aug 17, 2018, at 2:37 AM, Eric Seidel <eric at seidel.io> wrote:
>
> I think the reason is more that it's a change that doesn't seem to be well-motivated, i.e. neither the proposal nor the discussion offer a compelling example where you would want an unboxed tuple to be matched lazily.
>
> That being said, I overlooked the implicit-bang alternative when I first read the proposal. That seems quite reasonable. The default behavior remains what people seem to expect, but enables the explicit use of lazy patterns should you want them.
>
> On Thu, Aug 16, 2018, at 03:38, Simon Peyton Jones via ghc-steering-committee wrote:
>> I’m actually mildly in favour of the proposed design.
>>
>> The main reason for rejection is really
>>
>> * It’s a change
>>
>> Change is always a bit disruptive; and no one is arguing strongly that
>> they really really want this.
>>
>> So maybe we should just “park” it as OK in principle, but without
>> sufficient support to justify the (hard to quantify) changeover costs.
>>
>> Simon
>>
>> From: ghc-steering-committee <ghc-steering-committee-
>> bounces at haskell.org> On Behalf Of Vitaly Bragilevsky
>> Sent: 16 August 2018 01:37
>> To: ghc-steering-committee at haskell.org
>> Subject: [ghc-steering-committee] Proposal: Lazy unboxed tuples / warn
>> on unbanged strict patterns (#35); Recommendation: Reject
>>
>> Hi,
>>
>> the lazy unboxed tuples proposal
>> (https://github.com/ghc-proposals/ghc-proposals/pull/35<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F35&data=02%7C01%7Csimonpj%40microsoft.com%7C983115e9eee64eb4b03c08d603107655%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636699766583676606&sdata=PXTsCrM4otm8ZCEFZvNfkydSBo6J77zh5qb9CVNmZX8%3D&reserved=0> <https://github.com/ghc-proposals/ghc-proposals/pull/35%3Chttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F35&data=02%7C01%7Csimonpj%40microsoft.com%7C983115e9eee64eb4b03c08d603107655%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636699766583676606&sdata=PXTsCrM4otm8ZCEFZvNfkydSBo6J77zh5qb9CVNmZX8%3D&reserved=0%3E>)
>> was under discussion for a long period of time (more than a year and a
>> half since submission).
>>
>> As a shepherd to this proposal I recommend rejection based on the following:
>>
>> * there is no clearly articulated motivation in favor of this proposal
>> despite complying with the Manual;
>> * implementing this would lead to hard-to-trace performance issues in
>> the users code (due to move from strictness in current GHC behaviour to
>> laziness);
>> * it looks like the change (B) of the proposal (warn an unbanged strict
>> patterns) meets no complains, so it is better to be resubmitted as a
>> separate proposal;
>> * if resubmitted separately the change (A) should elaborate on
>> desugaring to make potential performance drawbacks clear;
>> * it seems (maybe mistakenly) that the author has lost his interest in
>> this proposal.
>>
>> Although silence is undestood as agreement, I'd be glad to receive a
>> feedback on this recommendation.
>>
>> Regards,
>> Vitaly
>> _______________________________________________
>> 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 <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 <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/20180817/9eb92980/attachment-0001.html>
More information about the ghc-steering-committee
mailing list