diff options
| author | tslil <tslil@posteo.de> | 2026-05-05 11:01:30 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-05-05 11:04:30 +0100 |
| commit | 1c47d2c4e0e9bd8ff38a7ef4939b78ac4722092b (patch) | |
| tree | c2337ea78dbb29437caa073610a7a7bfe0b717b8 /src/checker_state.rs | |
| parent | 90e451893671ceebaa37fcb634b5d7a3f153ba70 (diff) | |
replace todo! with real errors
Diffstat (limited to 'src/checker_state.rs')
| -rw-r--r-- | src/checker_state.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/checker_state.rs b/src/checker_state.rs index a8473ff..3404a35 100644 --- a/src/checker_state.rs +++ b/src/checker_state.rs @@ -12,24 +12,33 @@ use std::sync::atomic::{AtomicUsize, Ordering}; pub enum CheckerError { #[display("Unbound: {_0}")] Unbound(String), + #[display("Rebinding: {_0}")] Rebinding(String), + #[display("The following functionality is unimplemented: {_0}")] Unimplemented(String), + #[display("Element {value} claimed to belong to {claimed} but actually belongs to {real}")] WrongSetForElement { value: ElementValue, claimed: Set, real: Set, }, + #[display("Element {element} does belong to set {claimed}: {reason}")] ElementDoesNotBelong { element: Element, claimed: Set, reason: String, }, + + #[display("Case analysis {_0} does not have consistent set for scrutinee")] + ElementInconsistentCaseScrutineeSet(Element), + #[display("Case analysis {_0} does not have consistent set for scrutinee")] - IncosistentCaseScrutineeSet(Element), + InstanceInconsistentCaseScrutineeSet(Instance), + #[display("Incomplete case analysis: covered [{}] but required [{}]", found.join(", "), required.join(", ") @@ -38,23 +47,32 @@ pub enum CheckerError { found: Vec<String>, required: Vec<String>, }, + #[display("Instance {value} claimed to belong to {claimed} but actually belongs to {real}")] WrongSignatureForInstance { value: InstanceValue, claimed: Signature, real: Signature, }, + #[display("Instance {instance} is not of signature {claimed}: {reason}")] InstanceDoesNotBelong { instance: Instance, claimed: Signature, reason: String, }, + #[display("Non-functional instance {instance} found in application to elements {}", elements.iter().map(|e| e.to_string()).collect::<Vec<_>>().join(" "))] NonFunctionalInstance { instance: Instance, elements: Vec<Element>, }, + + #[display("Instance {instance} applied to too many arguments: {applied_to}")] + OverApplication { + instance: Instance, + applied_to: usize, + }, } // ----------------------------------------------------------------------------- |
