RE: Unpacking sum types

2015-09-08 Thread Simon Peyton Jones
| How did you envisage implementing anonymous boxed sums? What is their | heap representation? *Exactly* like tuples; that is, we have a family of data type declarations: data (a|b) = (_|) a | (|_) b data (a|b|c) = (_||) a | (|_|) b | (||_) c ..etc.

Re: Unpacking sum types

2015-09-08 Thread Simon Marlow
On 08/09/2015 09:31, Simon Peyton Jones wrote: | How did you envisage implementing anonymous boxed sums? What is their | heap representation? *Exactly* like tuples; that is, we have a family of data type declarations: data (a|b) = (_|) a | (|_) b data (a|b|c) = (_||) a

Re: Unpacking sum types

2015-09-08 Thread Simon Marlow
On 08/09/2015 09:31, Simon Peyton Jones wrote: | How did you envisage implementing anonymous boxed sums? What is their | heap representation? *Exactly* like tuples; that is, we have a family of data type declarations: data (a|b) = (_|) a | (|_) b data (a|b|c) = (_||) a

Re: Unpacking sum types

2015-09-08 Thread Simon Marlow
On 07/09/2015 15:35, Simon Peyton Jones wrote: Good start. I have updated the page to separate the source-language design (what the programmer sees) from the implementation. And I have included boxed sums as well – it would be deeply strange not to do so. How did you envisage implementing

Re: Unpacking sum types

2015-09-08 Thread Joachim Breitner
Hi, Am Dienstag, den 08.09.2015, 08:53 +0100 schrieb Simon Marlow: > On 07/09/2015 15:35, Simon Peyton Jones wrote: > > Good start. > > > > I have updated the page to separate the source-language design (what the > > programmer sees) from the implementation. > > > > And I have included boxed

RE: Unpacking sum types

2015-09-08 Thread Simon Peyton Jones
an unboxed tuple. (# (# Int,Bool #) | Int #) Simon | -Original Message- | From: Simon Marlow [mailto:marlo...@gmail.com] | Sent: 08 September 2015 09:55 | To: Simon Peyton Jones; Johan Tibell; Ryan Newton | Cc: ghc-devs@haskell.org | Subject: Re: Unpacking sum types

Re: Unpacking sum types

2015-09-08 Thread Richard Eisenberg
(# (# Int,Bool #) | Int #) > > Simon > > | -Original Message- > | From: Simon Marlow [mailto:marlo...@gmail.com] > | Sent: 08 September 2015 09:55 > | To: Simon Peyton Jones; Johan Tibell; Ryan Newton > | Cc: ghc-devs@haskell.org > | Subject: Re: Unpacking

Re: Unpacking sum types

2015-09-08 Thread Dan Doel
(# (# Int,Bool #) | Int #) >> >> Simon >> >> | -Original Message- >> | From: Simon Marlow [mailto:marlo...@gmail.com] >> | Sent: 08 September 2015 09:55 >> | To: Simon Peyton Jones; Johan Tibell; Ryan Newton >> | Cc: ghc-devs@hask

RE: Unpacking sum types

2015-09-07 Thread Simon Peyton Jones
Good start. I have updated the page to separate the source-language design (what the programmer sees) from the implementation. And I have included boxed sums as well – it would be deeply strange not to do so. Looks good to me! Simon From: Johan Tibell [mailto:johan.tib...@gmail.com] Sent:

Re: Unpacking sum types

2015-09-07 Thread Dan Doel
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 wrote: > Good start. > > > > I have updated the page to

RE: Unpacking sum types

2015-09-07 Thread Simon Peyton Jones
| 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