Add variables

This commit is contained in:
greg 2019-02-21 01:17:34 -08:00
parent a6eb2b4020
commit 6fba0cc5b4

View File

@ -30,13 +30,17 @@ impl TypeError {
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub enum Type { pub enum Type {
Const(TypeConst), Const(TypeConst),
Var(TypeVar),
Arrow(Box<Type>, Box<Type>), Arrow(Box<Type>, Box<Type>),
Compound { Compound {
ty: Box<Type>, ty_name: String,
args:Vec<Type> args:Vec<Type>
} }
} }
#[derive(Debug, Clone, PartialEq)]
pub struct TypeVar(String);
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub enum TypeConst { pub enum TypeConst {
Unit, Unit,