From 6fba0cc5b492af1d9f40a3fb5fcfb4a19c6d179b Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 21 Feb 2019 01:17:34 -0800 Subject: [PATCH] Add variables --- schala-lang/language/src/typechecking.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/schala-lang/language/src/typechecking.rs b/schala-lang/language/src/typechecking.rs index 01f39c1..4ae4fca 100644 --- a/schala-lang/language/src/typechecking.rs +++ b/schala-lang/language/src/typechecking.rs @@ -30,13 +30,17 @@ impl TypeError { #[derive(Debug, Clone, PartialEq)] pub enum Type { Const(TypeConst), + Var(TypeVar), Arrow(Box, Box), Compound { - ty: Box, + ty_name: String, args:Vec } } +#[derive(Debug, Clone, PartialEq)] +pub struct TypeVar(String); + #[derive(Debug, Clone, PartialEq)] pub enum TypeConst { Unit,