[ghc-steering-committee] Recommendation: reject #367 (was: Re: Please review #367: Clarify primops using unboxed sums, Shepherd: Simon Marlow)
Simon Peyton Jones
simonpj at microsoft.com
Tue Mar 9 10:12:04 UTC 2021
I'm content to follow Simon's recommendation.
The proposal says
I propose to replace the primops that produce product-encoded sums with ones that produce proper unboxed sums.
And it is nicer to have primops that are more explicit about their types, but of course GHC's ultimate representation of an unboxed sum is precisely the same as the current primop's one. So this is purely an ergonomic improvement, and one that will be felt only by a small constituency. So the costs of the current setup are not heavy.
It's a good proposal to have on file, in case it becomes more pressing some day.
Simon
From: ghc-steering-committee <ghc-steering-committee-bounces at haskell.org> On Behalf Of Simon Marlow
Sent: 08 March 2021 15:52
To: Joachim Breitner <mail at joachim-breitner.de>
Cc: ghc-steering-committee at haskell.org
Subject: [ghc-steering-committee] Recommendation: reject #367 (was: Re: Please review #367: Clarify primops using unboxed sums, Shepherd: Simon Marlow)
Committee,
Proposal #367 suggests using unboxed sums for the results of 7 (seven) primops that use sum types but currently have to encode those explicitly using `Int#`.
https://github.com/treeowl/ghc-proposals/blob/unboxed-sum-primops/proposals/0000-unboxed-sum-primops.md<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftreeowl%2Fghc-proposals%2Fblob%2Funboxed-sum-primops%2Fproposals%2F0000-unboxed-sum-primops.md&data=04%7C01%7Csimonpj%40microsoft.com%7C000703ba8b6f4771a5c108d8e24a21c6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508156673797668%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Nm7owDB1Mxxt5MG2JGe1%2Fw9t7FpDxBhU%2BppV09grIgg%3D&reserved=0>
The proposal is arguably the right thing, however I'm suggesting we reject it for the following reasons:
1. The implementations of the primops would bake in the translation of unboxed sums. Right now our unboxed sum translation is defined in one place - CorePrep - but this proposal would leak it into the implementations of a few primops.
2. Migration would entail adding a backwards-compatibility layer, with the associated complexity and risk of performance regressions.
3. While the current situation is perhaps inelegant, it's not broken and it's easy to understand.
Thoughts?
Simon
On Sun, 4 Oct 2020 at 22:14, Joachim Breitner <mail at joachim-breitner.de<mailto:mail at joachim-breitner.de>> wrote:
Dear Committee,
this is your secretary speaking:
Clarify primops using unboxed sum
has been proposed by David Feuer
https://github.com/ghc-proposals/ghc-proposals/pull/367<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F367&data=04%7C01%7Csimonpj%40microsoft.com%7C000703ba8b6f4771a5c108d8e24a21c6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508156673807671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=VR%2F9%2BRcLdFCqGcmxuCqPseHbr2rTjBDcX6r6NwDDvBs%3D&reserved=0>
https://github.com/treeowl/ghc-proposals/blob/unboxed-sum-primops/proposals/0000-unboxed-sum-primops.md<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftreeowl%2Fghc-proposals%2Fblob%2Funboxed-sum-primops%2Fproposals%2F0000-unboxed-sum-primops.md&data=04%7C01%7Csimonpj%40microsoft.com%7C000703ba8b6f4771a5c108d8e24a21c6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508156673807671%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=DRJrOd7m2X0sB1d9HdcdyHYUm7Z6HTuT0QHRB56FXFs%3D&reserved=0>
I'll propose Simon Marlow as the shepherd.
Please guide us to a conclusion as outlined in
https://github.com/ghc-proposals/ghc-proposals#committee-process<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%23committee-process&data=04%7C01%7Csimonpj%40microsoft.com%7C000703ba8b6f4771a5c108d8e24a21c6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508156673817669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=D%2FI8%2BJNnqo8XTVWtptXntxmBRwYP2wxZVX8tNxlZCQA%3D&reserved=0>
Thanks,
Joachim
--
Joachim Breitner
mail at joachim-breitner.de<mailto:mail at joachim-breitner.de>
http://www.joachim-breitner.de/<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.joachim-breitner.de%2F&data=04%7C01%7Csimonpj%40microsoft.com%7C000703ba8b6f4771a5c108d8e24a21c6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508156673827660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=lHwIB62LfzP%2F6e0MoitU5jlOQivnuB%2FrBlCgE7NOhfk%3D&reserved=0>
_______________________________________________
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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-steering-committee&data=04%7C01%7Csimonpj%40microsoft.com%7C000703ba8b6f4771a5c108d8e24a21c6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637508156673837651%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=oRJy6pL6bv9ZN6Q28ybaOHHMJE4yb9ieW0goPBHU4iw%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20210309/6d495ee4/attachment.html>
More information about the ghc-steering-committee
mailing list