Prefix form of unboxed tuple

Neil Mitchell ndmitchell at gmail.com
Fri Jul 6 11:07:27 EDT 2007


Hi

> No real reason why not.  If you write
>
> foo :: a -> b -> (# a,b #)
> foo x y = (# x, y #)
>
> then foo should work just fine.  So what you want needs two things:
>
> Do add a feature request if you like.  (And/or implement it!) It'd be a good "rounding out" thing.
>
> Another feature I'd like is for unboxed tuples to be more first class. For example, we don't currently allow
>         f :: (# a, b #) -> ...

Ah, this tripped me up for a long time this afternoon. The error
message I was getting was not particularly helpful - I discovered that
by putting this type in a constructor and projecting into and out of
the constructor things worked. I never realise that the unboxed tuple
in a type signature just didn't work.

Thanks

Neil


More information about the Glasgow-haskell-users mailing list