Skip to content

Commit

Permalink
slightly improve printing
Browse files Browse the repository at this point in the history
  • Loading branch information
oflatt committed Nov 18, 2024
1 parent 1d31817 commit 4a194a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ impl EGraph {
}
}

panic!("No cost for {:?}", value)
panic!(
"Failed to extract value {:?}. Did you use :unextractable constructors or the delete keyword?",
value
)
})
}

Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1197,27 +1197,27 @@ impl EGraph {
}
// Sorts are already declared during typechecking
ResolvedNCommand::Sort(_span, name, _presort_and_args) => {
log::info!("Declared sort {}.", name)
log::debug!("Declared sort {}.", name)
}
ResolvedNCommand::Function(fdecl) => {
self.declare_function(&fdecl)?;
log::info!("Declared function {}.", fdecl.name)
log::debug!("Declared function {}.", fdecl.name)
}
ResolvedNCommand::AddRuleset(name) => {
self.add_ruleset(name);
log::info!("Declared ruleset {name}.");
log::debug!("Declared ruleset {name}.");
}
ResolvedNCommand::UnstableCombinedRuleset(name, others) => {
self.add_combined_ruleset(name, others);
log::info!("Declared ruleset {name}.");
log::debug!("Declared ruleset {name}.");
}
ResolvedNCommand::NormRule {
ruleset,
rule,
name,
} => {
self.add_rule(rule, ruleset)?;
log::info!("Declared rule {name}.")
log::debug!("Declared rule {name}.")
}
ResolvedNCommand::RunSchedule(sched) => {
let report = self.run_schedule(&sched);
Expand Down

0 comments on commit 4a194a3

Please sign in to comment.