
| Are we okay with stealing some operator sections for this? E.G. (x
| ||). I think the boxed sums larger than 2 choices are all technically
| overlapping with sections.
I hadn't thought of that. I suppose that in distfix notation we could require spaces
(x | |)
since vertical bar by itself isn't an operator. But then (_||) x might feel more compact.
Also a section (x ||) isn't valid in a pattern, so we would not need to require spaces there.
But my gut feel is: yes, with AnonymousSums we should just steal the syntax. It won't hurt existing code (since it won't use AnonymousSums), and if you *are* using AnonymousSums then the distfix notation is probably more valuable than the sections for an operator you probably aren't using.
I've updated the wiki page
Simon
| -----Original Message-----
| From: Dan Doel [mailto:dan.doel@gmail.com]
| Sent: 07 September 2015 18:53
| To: Simon Peyton Jones
| Cc: Johan Tibell; Simon Marlow; Ryan Newton; ghc-devs@haskell.org
| Subject: Re: Unpacking sum types
|
| Are we okay with stealing some operator sections for this? E.G. (x
| ||). I think the boxed sums larger than 2 choices are all technically
| overlapping with sections.
|
| On Mon, Sep 7, 2015 at 10:35 AM, Simon Peyton Jones
|