[Hs-Generics] patch applied (generics): Description for constructor
cases
Alexey Rodriguez Yakushev
alexey at cs.uu.nl
Fri Jan 18 12:04:22 EST 2008
Fri Jan 18 08:46:33 PST 2008 Alexey Rodriguez <alexey at cs.uu.nl>
* Description for constructor cases
Constructor cases
-----------------
This is for testing constructor cases, that is, can you write
an ad-hoc case to handle one constructor and then let the rest
be handled/traversed generically?
Why is this useful?
Suppose you want to rewrite "x+0" to "x" in a big AST, you do not
want to program the traversal of other constructors, right?
Well, this removes "WithWeight" constructors handling the others
generically.
M ./comparison/TestRmWeights.lhs +12
More information about the Generics
mailing list