aboutsummaryrefslogtreecommitdiff
path: root/src/type/mod.rs
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-10 14:36:02 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-10 14:36:02 +0300
commitc121f20620499e9b7c497c82c7321474cbf59e1d (patch)
tree617c20d31cb577b459a423074d97a6e1b91e2a0c /src/type/mod.rs
parent09f39aebe68213799fdd7a33665a162c40baf299 (diff)
downloadmyslip-c121f20620499e9b7c497c82c7321474cbf59e1d.tar.gz
myslip-c121f20620499e9b7c497c82c7321474cbf59e1d.zip
Implemented aka. Changed Nil:st type to NilType from an empty list.
Diffstat (limited to 'src/type/mod.rs')
-rw-r--r--src/type/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/type/mod.rs b/src/type/mod.rs
index eba817b..9c2f89c 100644
--- a/src/type/mod.rs
+++ b/src/type/mod.rs
@@ -23,6 +23,8 @@ pub enum Type {
List(Vec<Type>),
+ NilType,
+
VecOf(Box<Type>),
VecType, // constructor
@@ -108,6 +110,7 @@ impl Type {
QuoteTy => Ok(()),
VecType => Ok(()),
LetType => Ok(()),
+ NilType => Ok(()),
Arrow(a, b) => b.is_concrete().and_then(|_ok| a.is_concrete()),
List(v) => {
let mut res = Ok(());