aboutsummaryrefslogtreecommitdiff
path: root/src/type/mod.rs
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-06 14:15:12 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-06 14:15:12 +0300
commit23b2028bdce46d02209fc2df70fc5468a8beffa8 (patch)
tree31e7a6fae6d5d01759a84334555f4cd1fa26a038 /src/type/mod.rs
parent3d7ebeddc46e89c8e058b3f1805f836339a2f9ae (diff)
downloadmyslip-23b2028bdce46d02209fc2df70fc5468a8beffa8.tar.gz
myslip-23b2028bdce46d02209fc2df70fc5468a8beffa8.zip
Added boilerplate and tests for let-binds
Diffstat (limited to 'src/type/mod.rs')
-rw-r--r--src/type/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/type/mod.rs b/src/type/mod.rs
index 0cbcf83..9e0d9ec 100644
--- a/src/type/mod.rs
+++ b/src/type/mod.rs
@@ -25,6 +25,8 @@ pub enum Type {
VecOf(Box<Type>),
VecType, // constructor
+ LetType,
+
/// Type for generics
/// and also error messages
/// with unknown types
@@ -102,6 +104,7 @@ impl Type {
Boolean => Ok(()),
QuoteTy => Ok(()),
VecType => Ok(()),
+ LetType => Ok(()),
Arrow(a, b) => b.is_concrete().and_then(|_ok| a.is_concrete()),
List(v) => {
let mut res = Ok(());
@@ -114,4 +117,5 @@ impl Type {
VarType(s) => Err(s.clone()),
}
}
+
}