mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Remove ExposedModuleTypes::Invalid
This commit is contained in:
parent
1beb0551cb
commit
f8cf18b10e
1 changed files with 15 additions and 22 deletions
|
@ -448,20 +448,18 @@ fn start_phase<'a>(
|
||||||
// ability specializations our dependents have, because those might be used by the
|
// ability specializations our dependents have, because those might be used by the
|
||||||
// specializations we've been asked to make.
|
// specializations we've been asked to make.
|
||||||
for (_module_id, exposed_types) in state.exposed_types.iter_all() {
|
for (_module_id, exposed_types) in state.exposed_types.iter_all() {
|
||||||
if let ExposedModuleTypes::Valid {
|
let ExposedModuleTypes {
|
||||||
solved_specializations,
|
solved_specializations,
|
||||||
..
|
..
|
||||||
} = exposed_types
|
} = exposed_types;
|
||||||
{
|
for (&(member, typ), &specialization) in solved_specializations.iter() {
|
||||||
for (&(member, typ), &specialization) in solved_specializations.iter() {
|
match abilities_store.get_specialization(member, typ) {
|
||||||
match abilities_store.get_specialization(member, typ) {
|
None => abilities_store.register_specialization_for_type(
|
||||||
None => abilities_store.register_specialization_for_type(
|
member,
|
||||||
member,
|
typ,
|
||||||
typ,
|
specialization,
|
||||||
specialization,
|
),
|
||||||
),
|
Some(existing) => debug_assert_eq!(existing, specialization),
|
||||||
Some(existing) => debug_assert_eq!(existing, specialization),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3532,18 +3530,12 @@ impl<'a> BuildTask<'a> {
|
||||||
let exposed = exposed_by_module
|
let exposed = exposed_by_module
|
||||||
.get(module)
|
.get(module)
|
||||||
.unwrap_or_else(|| internal_error!("No exposed types for {:?}", module));
|
.unwrap_or_else(|| internal_error!("No exposed types for {:?}", module));
|
||||||
if let ExposedModuleTypes::Valid {
|
let ExposedModuleTypes {
|
||||||
solved_specializations,
|
solved_specializations,
|
||||||
..
|
..
|
||||||
} = exposed
|
} = exposed;
|
||||||
{
|
for ((member, typ), specialization) in solved_specializations.iter() {
|
||||||
for ((member, typ), specialization) in solved_specializations.iter() {
|
abilities_store.register_specialization_for_type(*member, *typ, *specialization);
|
||||||
abilities_store.register_specialization_for_type(
|
|
||||||
*member,
|
|
||||||
*typ,
|
|
||||||
*specialization,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3589,6 +3581,7 @@ fn add_imports(
|
||||||
Some(ExposedModuleTypes {
|
Some(ExposedModuleTypes {
|
||||||
stored_vars_by_symbol,
|
stored_vars_by_symbol,
|
||||||
storage_subs,
|
storage_subs,
|
||||||
|
solved_specializations: _,
|
||||||
}) => {
|
}) => {
|
||||||
let variable = match stored_vars_by_symbol.iter().find(|(s, _)| *s == symbol) {
|
let variable = match stored_vars_by_symbol.iter().find(|(s, _)| *s == symbol) {
|
||||||
None => {
|
None => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue