aboutsummaryrefslogtreecommitdiff
path: root/src/type/util.rs
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-05 18:07:50 +0300
committerJoel Kronqvist <joel.kronqvist@iki.fi>2025-08-05 18:07:50 +0300
commitd64165e9e6af92bfe350e5d2cc46545b28dbb5c0 (patch)
treed7a6abb03a83ad08194b94db7b82a6c5f32b4819 /src/type/util.rs
parent1e712e91edea0735c5eb440af26ac6d4454e70a9 (diff)
downloadmyslip-d64165e9e6af92bfe350e5d2cc46545b28dbb5c0.tar.gz
myslip-d64165e9e6af92bfe350e5d2cc46545b28dbb5c0.zip
Added vectors and tests for their evaluation and typing
Diffstat (limited to 'src/type/util.rs')
-rw-r--r--src/type/util.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/type/util.rs b/src/type/util.rs
index 9be8c6e..85e64f1 100644
--- a/src/type/util.rs
+++ b/src/type/util.rs
@@ -9,3 +9,6 @@ pub fn vt(name: &str) -> Type {
VarType(name.to_string())
}
+pub fn vecof(ty: impl Into<Box<Type>>) -> Type {
+ VecOf(ty.into())
+}