Unit unboxed tuples

Simon Peyton-Jones simonpj at microsoft.com
Fri Dec 23 16:18:03 CET 2011


Very hard to be generic over *unboxed* tuples! 

But yes the non-uniformity in boxed tuples is annoying.

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-
| users-bounces at haskell.org] On Behalf Of Ganesh Sittampalam
| Sent: 23 December 2011 14:37
| To: glasgow-haskell-users at haskell.org
| Subject: Re: Unit unboxed tuples
| 
| 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
| either.
| 
| Cheers,
| 
| Ganesh
| 
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users





More information about the Glasgow-haskell-users mailing list