aboutsummaryrefslogtreecommitdiff
path: root/src/checker_state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/checker_state.rs')
-rw-r--r--src/checker_state.rs20
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,
+ },
}
// -----------------------------------------------------------------------------