mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
import aliases and put them in the scope
This commit is contained in:
parent
58467d6515
commit
247071668e
2 changed files with 39 additions and 13 deletions
|
@ -48,6 +48,7 @@ pub fn canonicalize_module_defs<'a>(
|
|||
module_ids: &ModuleIds,
|
||||
exposed_ident_ids: IdentIds,
|
||||
dep_idents: MutMap<ModuleId, IdentIds>,
|
||||
aliases: MutMap<Symbol, Alias>,
|
||||
exposed_imports: MutMap<Ident, (Symbol, Region)>,
|
||||
mut exposed_symbols: MutSet<Symbol>,
|
||||
var_store: &mut VarStore,
|
||||
|
@ -56,6 +57,10 @@ pub fn canonicalize_module_defs<'a>(
|
|||
let mut scope = Scope::new(home, var_store);
|
||||
let num_deps = dep_idents.len();
|
||||
|
||||
for (name, alias) in aliases.into_iter() {
|
||||
scope.add_alias(name, alias.region, alias.vars, alias.typ);
|
||||
}
|
||||
|
||||
// Desugar operators (convert them to Apply calls, taking into account
|
||||
// operator precedence and associativity rules), before doing other canonicalization.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue