Tue Feb 12 03:25:04 PST 2008 Alexey Rodriguez
* Simplification of representation of arity two
Previously the arity two representation was
|data Rep2 f a b c d = ...| where |c| and |c|
represented the non-generic variables (for
example for the two variables used in crushRight:
|Rep2 CrushRight a b c d| and
|newtype CrushRight c b a x = CrushRight { crushRight :: (c -> b -> b) -> b -> a -> b }
).
It turns out that |Rep2| does not need the additional c and d,
we do the same thing that the EMGM version of the test was doing:
data Rep2 f a b = ...
newtype CrushRight c b a x = CrushRight { crushRight :: (c -> b -> b) -> b -> a -> b }
so it is represented as |Rep2 (CrushRight c d) a b|.
M ./comparison/LIGD/BinTreeReps.hs -1 +1
M ./comparison/LIGD/CrushRight.lhs -5 +4
M ./comparison/LIGD/GMap.lhs -6 +4
M ./comparison/LIGD/LIGD.lhs -27 +27
M ./comparison/LIGD/TreeReps.hs -1 +1