Re: Prefix form of unboxed tuple

2007-07-06 Thread John Meacham
On Fri, Jul 06, 2007 at 11:26:00AM +0100, Neil Mitchell wrote: ghci -fglasgow-exts Prelude case (# 1 , 2 #) of (# a , b #) - error $ show (a,b) *** Exception: (1,2) You might expect there to be a prefix form of the unboxed tuple: Prelude case (#,#) 1 2 of (# a , b #) - error $ show (a,b

Re: Prefix form of unboxed tuple

2007-07-06 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Meacham wrote: On Fri, Jul 06, 2007 at 11:26:00AM +0100, Neil Mitchell wrote: ghci -fglasgow-exts Prelude case (# 1 , 2 #) of (# a , b #) - error $ show (a,b) *** Exception: (1,2) You might expect there to be a prefix form of the unboxed

RE: Prefix form of unboxed tuple

2007-07-06 Thread Simon Peyton-Jones
| You might expect there to be a prefix form of the unboxed tuple: | | Prelude case (#,#) 1 2 of (# a , b #) - error $ show (a,b) | interactive:1:7: parse error on input `,' | | But there isn't. No real reason why not. If you write foo :: a - b - (# a,b #) foo x y = (# x, y #) then foo should

RE: Re[2]: Prefix form of unboxed tuple

2007-07-06 Thread Simon Peyton-Jones
| one particular feature i wanted in my fast io/serialization libs is | ability to return unboxed tuple from IO action. is this also possible? No -- that's an example of instantiating a polymorphic type with an unboxed one. Sorry. S ___