aboutsummaryrefslogtreecommitdiff
path: root/src/type/check.rs
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-16 03:25:45 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-16 03:25:45 +0300
commit4daf7b149622a16a2271630a19f0833702477a86 (patch)
treebc09cbc387ab4e551557f94b67c72e7095a07658 /src/type/check.rs
parentfad9bf51e9ecd48473046a5e7bb9b5005893ae89 (diff)
downloadmyslip-4daf7b149622a16a2271630a19f0833702477a86.tar.gz
myslip-4daf7b149622a16a2271630a19f0833702477a86.zip
feat: vector concatenation
Diffstat (limited to 'src/type/check.rs')
-rw-r--r--src/type/check.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/type/check.rs b/src/type/check.rs
index 170feec..fd5d1d3 100644
--- a/src/type/check.rs
+++ b/src/type/check.rs
@@ -244,6 +244,13 @@ impl SExp {
Ok(arr(List(vec![Integer, Integer]), Boolean)),
Atom(Or | And | Xor) => Ok(arr(List(vec![Boolean, Boolean]), Boolean)),
Atom(Not) => Ok(arr(Boolean, Boolean)),
+ Atom(Concat) => Ok(arr(
+ List(vec![
+ List(vec![VecType, vecof(vt("T"))]),
+ List(vec![VecType, vecof(vt("T"))])
+ ]),
+ List(vec![VecType, vecof(vt("T"))])
+ )),
Atom(Nil) => Ok(NilType),
Atom(Quote) => Ok(arr(
vt("T"),