diff options
Diffstat (limited to 'src/type/util.rs')
-rw-r--r-- | src/type/util.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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<Box<Type>>, b: impl Into<Box<Type>>) -> Type { Arrow(a.into(), b.into()) } +pub fn sumtype(a: impl Into<Box<Type>>, b: impl Into<Box<Type>>) -> Type { + SumType(a.into(), b.into()) +} + pub fn vt(name: &str) -> Type { VarType(name.to_string()) } |