Skip to content

Commit

Permalink
remove declare fn
Browse files Browse the repository at this point in the history
  • Loading branch information
yihozhang committed Aug 22, 2024
1 parent fe50c1a commit 09a4e8c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/ast/desugar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,31 +373,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,
}),
NCommand::CoreAction(Action::Let(
span.clone(),
name,
Expr::Call(span.clone(), fresh, vec![]),
)),
]
}

pub fn desugar_function(&mut self, fdecl: &FunctionDecl) -> Vec<NCommand> {
vec![NCommand::Function(FunctionDecl {
name: fdecl.name,
Expand Down

0 comments on commit 09a4e8c

Please sign in to comment.