TypeEnvironment lives in Infer

This commit is contained in:
greg 2018-05-17 23:27:28 -07:00
parent c96a56a7ac
commit 3a3b8dd440

View File

@ -141,7 +141,7 @@ impl Substitution {
} }
#[derive(Debug)] #[derive(Debug, Default)]
struct TypeEnvironment { struct TypeEnvironment {
map: HashMap<Rc<String>, PolyType>, map: HashMap<Rc<String>, PolyType>,
} }
@ -272,6 +272,7 @@ impl TypeContext {
// this is the equivalent of the Haskell Infer monad // this is the equivalent of the Haskell Infer monad
#[derive(Debug, Default)] #[derive(Debug, Default)]
struct Infer { struct Infer {
env: TypeEnvironment,
_idents: u32, _idents: u32,
} }