aboutsummaryrefslogtreecommitdiff
path: root/src/type/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/type/mod.rs')
-rw-r--r--src/type/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/type/mod.rs b/src/type/mod.rs
index bfe0055..c726001 100644
--- a/src/type/mod.rs
+++ b/src/type/mod.rs
@@ -31,6 +31,8 @@ pub enum Type {
VecOf(Box<Type>),
VecType, // constructor
+ SumType(Box<Type>, Box<Type>),
+
LetType,
/// Type for generics
@@ -156,7 +158,8 @@ impl Type {
LetType => Ok(()),
NilType => Ok(()),
TypeLit => Ok(()),
- Arrow(a, b) => b.is_concrete().and_then(|_ok| a.is_concrete()),
+ Arrow(a, b) => b.is_concrete().and_then(|_ok| a.is_concrete()),
+ SumType(a, b) => b.is_concrete().and_then(|_ok| a.is_concrete()),
List(v) => {
let mut res = Ok(());
for t in v {