Add variables
This commit is contained in:
parent
a6eb2b4020
commit
6fba0cc5b4
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user