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
-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
| 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
| 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
___