mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
wip
This commit is contained in:
parent
920b530008
commit
461e166254
16 changed files with 279 additions and 488 deletions
|
@ -137,11 +137,16 @@ pub fn canonicalize_module_defs<'a>(
|
|||
|
||||
let mut references = MutSet::default();
|
||||
|
||||
// Gather up all the symbols that were referenced across all the defs.
|
||||
// Gather up all the symbols that were referenced across all the defs' lookups.
|
||||
for symbol in output.references.lookups.iter() {
|
||||
references.insert(*symbol);
|
||||
}
|
||||
|
||||
// Gather up all the symbols that were referenced across all the defs' calls.
|
||||
for symbol in output.references.calls.iter() {
|
||||
references.insert(*symbol);
|
||||
}
|
||||
|
||||
// Gather up all the symbols that were referenced from other modules.
|
||||
for symbol in env.referenced_symbols.iter() {
|
||||
references.insert(*symbol);
|
||||
|
@ -231,6 +236,11 @@ pub fn canonicalize_module_defs<'a>(
|
|||
references.insert(symbol);
|
||||
}
|
||||
|
||||
// Incorporate any remaining output.calls entries into references.
|
||||
for symbol in output.references.calls {
|
||||
references.insert(symbol);
|
||||
}
|
||||
|
||||
Ok(ModuleOutput {
|
||||
aliases,
|
||||
rigid_variables,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue