data Expr = Var Int | Neg Expr | Add Expr Expr deriving (Data,Typeable)
All the Uniplate operations defined in Data.Generics.Uniplate.Operations can be used.
For faster performance (5x faster, but requires writing instances) switch to
Data.Generics.Uniplate.Direct. If you get instance conflicts
when using both
Direct, switch to Data.Generics.Uniplate.DataOnly.
Apply a sequence of transformations in order. This function obeys the equivalence:
transformBis [[transformer f],[transformer g],...] == transformBi f . transformBi g . ...
Each item of type
[Transformer] is applied in turn, right to left. Within each
[Transformer], the individual
Transformer values may be interleaved.
The implementation will attempt to perform fusion, and avoid walking any part of the data structure more than necessary. To further improve performance, you may wish to partially apply the first argument, which will calculate information about the relationship between the transformations.