aboutsummaryrefslogtreecommitdiff
path: root/src/checker.rs
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2026-04-29 12:45:48 +0100
committertslil <tslil@posteo.de>2026-04-29 14:12:10 +0100
commitcafb3a62af10bb09f8489ba0ab07258a70a75664 (patch)
treef42ebdbd75e0f4dda97750d10e95a6d930be639a /src/checker.rs
parent651a67cb568d80e72f8c6a650b985991f4b129d8 (diff)
wire in instance checking to the main checker
Diffstat (limited to 'src/checker.rs')
-rw-r--r--src/checker.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/checker.rs b/src/checker.rs
index aefbb02..dc3dc3c 100644
--- a/src/checker.rs
+++ b/src/checker.rs
@@ -35,10 +35,15 @@ impl CheckerState {
let signature = self.check_signature(signature.clone())?;
self.add_signature(name, signature)
}
- Decl::Instance { name, .. } => {
+ Decl::Instance {
+ name,
+ instance,
+ signature,
+ } => {
self.assert_unbound_instance(name)?;
-
- return Err(CheckerError::Unimplemented("instances".to_string()));
+ let signature = self.check_signature(signature.clone())?;
+ let instance = self.check_instance(instance.clone(), &signature)?;
+ self.add_instance(name.clone(), instance.into(), signature)
}
}?;
}