## treecode-rewrite.api
#
# "a generic term rewriting engine which is useful for
# performing various transformations on [Treecode] terms."
#
# -- http://www.cs.nyu.edu/leunga/MLRISC/Doc/html/mltree-util.html
#
# A rewrite function for Treecode sumtypes
# Useful for performing transformation on Treecode.
# The api is a bit hairy since we have to deal with extensions.
# Compiled by:
#
src/lib/compiler/back/low/lib/treecode.libapi Treecode_Rewrite {
#
package tcf: Treecode_Form; # Treecode_Form is from
src/lib/compiler/back/low/treecode/treecode-form.api rewrite:
# User supplied transformations
#
{ int_expression: (tcf::Int_Expression -> tcf::Int_Expression ) -> (tcf::Int_Expression -> tcf::Int_Expression ),
float_expression: (tcf::Float_Expression -> tcf::Float_Expression) -> (tcf::Float_Expression -> tcf::Float_Expression),
flag_expression: (tcf::Flag_Expression -> tcf::Flag_Expression ) -> (tcf::Flag_Expression -> tcf::Flag_Expression ), # flag expressions handle zero/parity/overflow/... flag stuff.
void_expression: (tcf::Void_Expression -> tcf::Void_Expression ) -> (tcf::Void_Expression -> tcf::Void_Expression )
}
->
tcf::Rewrite_Fns;
};