[Yhc] Compiling Prelude.hs
Thomas Shackell
shackell at cs.york.ac.uk
Thu Jan 19 07:12:44 EST 2006
Krasimir Angelov wrote:
> 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
Yes, the 1 tuple is entirely redundant, however, given the compiler uses
tuples for every other size of dictionary it would be a nuisance to add
lots of special case code in the compiler to optimise away the one tuple.
Thanks
Tom
More information about the Yhc
mailing list