aboutsummaryrefslogtreecommitdiff
path: root/src/type/mod.rs
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-05 19:29:28 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-05 19:29:28 +0300
commit3d7ebeddc46e89c8e058b3f1805f836339a2f9ae (patch)
tree80736ecf56e6678e5ed9c1fd0d2bba3f99f377e5 /src/type/mod.rs
parentd64165e9e6af92bfe350e5d2cc46545b28dbb5c0 (diff)
downloadmyslip-3d7ebeddc46e89c8e058b3f1805f836339a2f9ae.tar.gz
myslip-3d7ebeddc46e89c8e058b3f1805f836339a2f9ae.zip
Implemented vector.
Diffstat (limited to 'src/type/mod.rs')
-rw-r--r--src/type/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/type/mod.rs b/src/type/mod.rs
index 01aed40..0cbcf83 100644
--- a/src/type/mod.rs
+++ b/src/type/mod.rs
@@ -16,13 +16,14 @@ pub enum Type {
Boolean,
- QuoteTy,
+ QuoteTy, //constructor
Arrow(Box<Type>, Box<Type>),
List(Vec<Type>),
VecOf(Box<Type>),
+ VecType, // constructor
/// Type for generics
/// and also error messages
@@ -100,6 +101,7 @@ impl Type {
Integer => Ok(()),
Boolean => Ok(()),
QuoteTy => Ok(()),
+ VecType => Ok(()),
Arrow(a, b) => b.is_concrete().and_then(|_ok| a.is_concrete()),
List(v) => {
let mut res = Ok(());