Skip to content

Commit

Permalink
Merge pull request #419 from egraphs-good/cleanup-declare
Browse files Browse the repository at this point in the history
Remove `declare` since it's dead code
  • Loading branch information
yihozhang committed Aug 23, 2024
2 parents b04953f + 803f399 commit 757c52f
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/ast/desugar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,32 +423,6 @@ impl Desugar {
.map_err(|e| e.map_token(|tok| tok.to_string()))?)
}

// TODO declare by creating a new global function. See issue #334
pub fn declare(&mut self, span: Span, name: Symbol, sort: Symbol) -> Vec<NCommand> {
let fresh = self.get_fresh();
vec![
NCommand::Function(FunctionDecl {
name: fresh,
schema: Schema {
input: vec![],
output: sort,
},
default: None,
merge: None,
merge_action: Actions::default(),
cost: None,
unextractable: false,
ignore_viz: false,
span: span.clone(),
}),
NCommand::CoreAction(Action::Let(
span.clone(),
name,
Expr::Call(span.clone(), fresh, vec![]),
)),
]
}

pub fn parent_name(&mut self, eqsort_name: Symbol) -> Symbol {
self.fresh_gen
.generate_special(&format!("{}Parent", eqsort_name).into())
Expand Down

0 comments on commit 757c52f

Please sign in to comment.