pub type Action = GenericAction<String, String>;Aliased Type§
enum Action {
Let(Span, String, GenericExpr<String, String>),
Set(Span, String, Vec<GenericExpr<String, String>>, GenericExpr<String, String>),
Change(Span, Change, String, Vec<GenericExpr<String, String>>),
Union(Span, GenericExpr<String, String>, GenericExpr<String, String>),
Panic(Span, String),
Expr(Span, GenericExpr<String, String>),
}Variants§
Let(Span, String, GenericExpr<String, String>)
Bind a variable to a particular datatype or primitive.
At the top level (in a [Command::Action]), this defines a global variable.
In a [Command::Rule], this defines a local variable in the actions.
Set(Span, String, Vec<GenericExpr<String, String>>, GenericExpr<String, String>)
set a function to a particular result.
set should not be used on datatypes-
instead, use union.
Change(Span, Change, String, Vec<GenericExpr<String, String>>)
Delete or subsume (mark as hidden from future rewrites and unextractable) an entry from a function.
Union(Span, GenericExpr<String, String>, GenericExpr<String, String>)
union two datatypes, making them equal
in the implicit, global equality relation
of egglog.
All rules match modulo this equality relation.
Example:
(datatype Math (Num i64))
(union (Num 1) (Num 2)); Define that Num 1 and Num 2 are equivalent
(extract (Num 1)); Extracts Num 1
(extract (Num 2)); Extracts Num 1