From 3a3b8dd44028d52927810048e75001603d79c4fd Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 17 May 2018 23:27:28 -0700 Subject: [PATCH] TypeEnvironment lives in Infer --- schala-lang/src/typechecking.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schala-lang/src/typechecking.rs b/schala-lang/src/typechecking.rs index 87827f6..660bf51 100644 --- a/schala-lang/src/typechecking.rs +++ b/schala-lang/src/typechecking.rs @@ -141,7 +141,7 @@ impl Substitution { } -#[derive(Debug)] +#[derive(Debug, Default)] struct TypeEnvironment { map: HashMap, PolyType>, } @@ -272,6 +272,7 @@ impl TypeContext { // this is the equivalent of the Haskell Infer monad #[derive(Debug, Default)] struct Infer { + env: TypeEnvironment, _idents: u32, }