Isaac Dupree wrote:

would implementing that make it harder or easier for ghci to support unboxed tuples?

Slightly easier, in that construction (of unboxed tuples with lifted components only) could be done by calling the curried construction functions in PrimopWrappers.

Deconstruction could be done in a similar way; that is we need a family of functions like

liftUbx2 :: (State# -> (# a, b #)) -> (a, b)

the State# argument is just a hack to lift the unboxed tuple. So you could then compile

  case f x of
    (# a, b #) -> ...

into

  let f' = \s -> f x in
  case liftUbx2 f' of
    (a, b) -> ...

but this only works for unboxed tuples with lifted components. You could also generate some similar wrappers for particular instances of unboxed tuples with unlifted components. Doesn't sound particularly attractive, though.

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to