Variable types -> metadata
This commit is contained in:
@@ -325,6 +325,7 @@ impl ir::ProgramInfo for ProgramInfo {
|
||||
type AssumptionMeta = Infallible;
|
||||
type RuleMeta = AstNode;
|
||||
type RuleBodyMeta = AstNode;
|
||||
type VariableMeta = Infallible;
|
||||
type ExprMeta = AstNode;
|
||||
type BinaryOp = BinaryOpKind;
|
||||
type UnaryOp = ir::UnaryOpKind;
|
||||
|
||||
@@ -135,10 +135,10 @@ pub struct RuleBody<T: ProgramInfo> {
|
||||
/// Metadata for this rule body.
|
||||
pub meta: T::RuleBodyMeta,
|
||||
|
||||
/// The type of each variable.
|
||||
/// The metadata for each variable.
|
||||
///
|
||||
/// Also defines the upper bound on valid variable indices.
|
||||
pub vars: Vec<Type>,
|
||||
pub vars: Vec<T::VariableMeta>,
|
||||
|
||||
/// Maps relation indices to the IDs of loaded relations.
|
||||
pub loaded: Vec<T::RelationLabel>,
|
||||
@@ -435,6 +435,9 @@ pub trait ProgramInfo {
|
||||
/// Metadata for a rule body.
|
||||
type RuleBodyMeta: Info;
|
||||
|
||||
/// Metadata for each variable in a rule body.
|
||||
type VariableMeta: Info;
|
||||
|
||||
/// Metadata for each expression tree node.
|
||||
type ExprMeta: Info;
|
||||
|
||||
@@ -464,6 +467,7 @@ macro_rules! def_bound_info {
|
||||
AssumptionMeta: $bounds,
|
||||
RuleMeta: $bounds,
|
||||
RuleBodyMeta: $bounds,
|
||||
VariableMeta: $bounds,
|
||||
ExprMeta: $bounds,
|
||||
BinaryOp: $bounds,
|
||||
UnaryOp: $bounds,
|
||||
@@ -479,6 +483,7 @@ macro_rules! def_bound_info {
|
||||
AssumptionMeta: $bounds,
|
||||
RuleMeta: $bounds,
|
||||
RuleBodyMeta: $bounds,
|
||||
VariableMeta: $bounds,
|
||||
ExprMeta: $bounds,
|
||||
BinaryOp: $bounds,
|
||||
UnaryOp: $bounds,
|
||||
|
||||
Reference in New Issue
Block a user