collect and instantiate hidden variables

This commit is contained in:
Folkert 2020-10-25 19:11:03 +01:00
parent 2c55fa5ec5
commit f13c28fe7f
5 changed files with 59 additions and 19 deletions

View file

@ -281,15 +281,8 @@ pub fn canonicalize_defs<'a>(
}
scope.add_alias(symbol, ann.region, can_vars.clone(), can_ann.typ.clone());
let alias = roc_types::types::Alias {
region: ann.region,
vars: can_vars,
uniqueness: None,
typ: can_ann.typ,
};
aliases.insert(symbol, alias);
let alias = scope.lookup_alias(symbol).expect("alias is added to scope");
aliases.insert(symbol, alias.clone());
}
other => value_defs.push(other),
}