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?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to