diff options
| author | tslil <tslil@posteo.de> | 2026-04-27 15:49:54 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-04-27 16:08:28 +0100 |
| commit | c5ebf74c917b94c8499fa5cd2e125b04ec7529b4 (patch) | |
| tree | 035d58b1686a2b85f715ffe80c100f24efaa7385 /src/checker_signature.rs | |
| parent | 62cfbb77d4d153cdcc61b0f8c063a358dfcbbc29 (diff) | |
prepare for more work on signatures, in particular this means processing records in telescoped contexts
rework ElementValue, CheckedElement to be type aliases for the generic version over Term : Type
Diffstat (limited to 'src/checker_signature.rs')
| -rw-r--r-- | src/checker_signature.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/checker_signature.rs b/src/checker_signature.rs index 4fa723f..4d5f02c 100644 --- a/src/checker_signature.rs +++ b/src/checker_signature.rs @@ -12,14 +12,20 @@ impl CheckerState { let deref = self.lookup_signature(&v)?; Ok(deref.clone()) } - Signature::Ext { params, codomain } => Err(CheckerError::Unimplemented( + Signature::Ext { .. } => Err(CheckerError::Unimplemented( "extension signatures".to_string(), )), Signature::Theory(fields) => { + let mut ctx = self.clone(); let fields = fields .into_iter() .map(|SigField { signature, name }| { - let signature = self.check_signature(signature)?; + let signature = ctx.check_signature(signature)?; + ctx.add_instance( + name.clone(), + InstanceValue::Hypothetical(signature.clone()), + signature.clone(), + )?; Ok(SigField { name, signature }) }) .collect::<Result<Vec<_>, _>>()?; |
