Unit unboxed tuples
Christian Höner zu Siederdissen
choener at tbi.univie.ac.at
Fri Dec 23 18:07:03 CET 2011
I have to second that. I recently "fell" over that problem when writing
instances for certain kinds of tuples. In libraries, such as "tuple"
there is a special 'OneTuple' constructor but I'd really appreciate a
more uniform fix -- but don't know of one either...
* Ganesh Sittampalam <ganesh at earth.li> [23.12.2011 15:39]:
> On 23/12/2011 13:46, Ian Lynagh wrote:
> > On Fri, Dec 23, 2011 at 01:34:49PM +0000, Simon Peyton-Jones wrote:
> >> Arguments Boxed Unboxed
> >> 3 ( , , ) (# , , #)
> >> 2 ( , ) (# , #)
> >> 1
> >> 0 () (# #)
> >> Simple, uniform.
> > Uniform horizontally, but strange vertically!
> It's worth mentioning that if you want to write code that's generic over
> tuples in some way, the absence of a case for singletons is actually a
> bit annoying - you end up adding something like a One constructor to
> paper over the gap. But I can't think of any nice syntax for that case
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: not available
More information about the Glasgow-haskell-users