From a1ac176dd77ff9acaf62de825c24e3cdbd3bcdaa Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sun, 17 Aug 2025 13:09:19 +0300 Subject: fix: changed type of (() T) from (T ...) to (Vector (T ...)) this makes the type of the empty vector consistent with the runtime behavior and prevents weirdly typed expressions such as (vector (() Int)) : (Vector (Int ...)). removed an unused import in case.rs and changed a unused pattern variable to an underscore in conversion.rs. --- src/type/check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/type/check.rs') diff --git a/src/type/check.rs b/src/type/check.rs index fd5d1d3..a54ffc2 100644 --- a/src/type/check.rs +++ b/src/type/check.rs @@ -292,7 +292,7 @@ impl SExp { if (**op).clone() == Atom(Nil) { return match (**l).clone() { SCons(v, n) if *n == Atom(Nil) => match *v { - Atom(Ty(t)) => Ok(vecof(t)), + Atom(Ty(t)) => Ok(List(vec![VecType, vecof(t)])), _ => Err(OtherError), }, _ => Err(OtherError) -- cgit v1.2.3