mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Cleanup abilities_in_scope
and rename to pending_abilities_in_scope
`abilities_in_scope` is a buffer we use to keep track of locally-defined abilities before we've fully resolved them. We do this because we canonicalize ability members signatures before we've registered an ability to the abilities store, and canonicalization of signatures must report `has` bounds that don't reference abilities. So, this buffer is more appropriately named `pending_abilities_in_scope`. There is also no reason to export it, because it is only relevant during canonicalization of type defs in a module.
This commit is contained in:
parent
eb706d2863
commit
22bf650685
4 changed files with 19 additions and 21 deletions
|
@ -357,13 +357,16 @@ pub fn canonicalize_module_defs<'a>(
|
|||
let symbols_from_requires = symbols_from_requires
|
||||
.iter()
|
||||
.map(|(symbol, loc_ann)| {
|
||||
// We've already canonicalized the module, so there are no pending abilities.
|
||||
let pending_abilities_in_scope = &[];
|
||||
|
||||
let ann = canonicalize_annotation(
|
||||
&mut env,
|
||||
&mut scope,
|
||||
&loc_ann.value,
|
||||
loc_ann.region,
|
||||
var_store,
|
||||
&output.abilities_in_scope,
|
||||
pending_abilities_in_scope,
|
||||
);
|
||||
|
||||
ann.add_to(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue