
31 Jan
2008
31 Jan
'08
11:14 p.m.
You could solve it this way:
data PairL a b = PairL a !b
where (a,b,c) is syntactic sugar for PairL a (PairL b (PairL c ()))
There are still potential efficiency issues, although this could be worked out in the compiler; right now it's a single operation to get from a tuple to any member, but in PairL it takes n operations to get from the root to the nth elment of the tuple. The "unbox-strict-fields" optimization can fix this.
can it really fix that for polymorphic members?