From 4a194a30c85ea19ea6cb1ca6dfff2730f3f9b32e Mon Sep 17 00:00:00 2001 From: oflatt Date: Mon, 18 Nov 2024 11:48:58 -0800 Subject: [PATCH] slightly improve printing --- src/extract.rs | 5 ++++- src/lib.rs | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/extract.rs b/src/extract.rs index 2d55400d..1b2582e9 100644 --- a/src/extract.rs +++ b/src/extract.rs @@ -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 + ) }) } diff --git a/src/lib.rs b/src/lib.rs index c400a698..69ca8abb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1197,19 +1197,19 @@ 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, @@ -1217,7 +1217,7 @@ impl EGraph { 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);