From a70dcaa949f41c585f9aea5e79f2550053d8e857 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Tue, 19 Aug 2025 13:55:05 +0300 Subject: test: added boilerplate and tests for coproduct parsing, type checking and evaluation --- src/type/util.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/type/util.rs') diff --git a/src/type/util.rs b/src/type/util.rs index 04b4ee6..0ea1e4d 100644 --- a/src/type/util.rs +++ b/src/type/util.rs @@ -6,6 +6,10 @@ pub fn arr(a: impl Into>, b: impl Into>) -> Type { Arrow(a.into(), b.into()) } +pub fn sumtype(a: impl Into>, b: impl Into>) -> Type { + SumType(a.into(), b.into()) +} + pub fn vt(name: &str) -> Type { VarType(name.to_string()) } -- cgit v1.2.3