2006/1/19, Thomas Shackell <[EMAIL PROTECTED]>:
> Yes this is a problem, I had to add size 1 tuple directly into the
> runtime. Thus no Haskell programmer can write something with a size one
> tuple but the compiler can still generate code that uses it.
>
> This is done in src/runtime/BCKernel/builtin/Prelude.c
>
>   prim_addCon("1", 1, 0, CI_NONE);
>
> which adds a data type called "1" directly into the prelude dictionary
> (which makes sense since (,) is called "2" and (,,) is called "3").

I can write a manually implementation for tuple of size 1 but I wonder
wheter the generation of such tuples can be avoided. If you have to
pass the (x) tuple to somewhere then you can simply pass the value of
x instead. In addition all pattern matchings for (x) should be
removed.

Cheers,
  Krasimir
_______________________________________________
Yhc mailing list
[email protected]
http://haskell.org/mailman/listinfo/yhc

Reply via email to