diff options
| author | tslil <tslil@posteo.de> | 2026-04-29 12:45:48 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-04-29 14:12:10 +0100 |
| commit | cafb3a62af10bb09f8489ba0ab07258a70a75664 (patch) | |
| tree | f42ebdbd75e0f4dda97750d10e95a6d930be639a /src/checker_state.rs | |
| parent | 651a67cb568d80e72f8c6a650b985991f4b129d8 (diff) | |
wire in instance checking to the main checker
Diffstat (limited to 'src/checker_state.rs')
| -rw-r--r-- | src/checker_state.rs | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/checker_state.rs b/src/checker_state.rs index b710ac3..1a6a0bd 100644 --- a/src/checker_state.rs +++ b/src/checker_state.rs @@ -41,7 +41,7 @@ pub enum CheckerError { claimed: Signature, real: Signature, }, - #[display("Instance {instance} does belong to set {claimed}: {reason}")] + #[display("Instance {instance} is not of signature {claimed}: {reason}")] InstanceDoesNotBelong { instance: Instance, claimed: Signature, @@ -111,7 +111,6 @@ pub struct CheckerState { variant_fields: HashMap<String, Field<Set>>, signature_fields: HashMap<String, Field<Signature>>, binder_element: usize, - binder_instance: usize, } impl fmt::Display for CheckerState { @@ -424,30 +423,4 @@ impl CheckerState { self.binder_element += 1; Ok(()) } - - #[instrument(skip(self), level = "debug", fields(%name, %signature))] - pub fn make_instance_binding( - &mut self, - name: String, - signature: Signature, - ) -> Result<(), CheckerError> { - let canonical = format!("db_i_{}", self.binder_instance); - self.add_instance( - canonical.clone(), - InstanceValue::Hypothetical, - signature.clone(), - )?; - self.add_instance( - name.clone(), - Instance::Var(canonical.clone()).into(), - signature.clone(), - )?; - // And lo, the special case, our chosen canonical form - if signature == Signature::Set { - self.add_set(name, Set::ClaimedSet(Instance::Var(canonical)).into())?; - } - - self.binder_instance += 1; - Ok(()) - } } |
