Merge pull request #3589 from rtfeldman/can-abilities3

Canonicalize syntactic abilities: Part 3 - solving
This commit is contained in:
Ayaz 2022-07-25 21:48:14 -05:00 committed by GitHub
commit 6b6f240acb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 594 additions and 274 deletions

View file

@ -1,4 +1,4 @@
use crate::abilities::{PendingAbilitiesStore, ResolvedSpecializations};
use crate::abilities::{ImplKey, PendingAbilitiesStore, ResolvedImpl};
use crate::annotation::canonicalize_annotation;
use crate::def::{canonicalize_defs, Def};
use crate::effect_module::HostedGeneratedFunctions;
@ -103,12 +103,20 @@ impl ExposedForModule {
}
}
/// During type solving and monomorphization, a module must know how its imported ability
/// implementations are resolved - are they derived, or have a concrete implementation?
///
/// Unfortunately we cannot keep this information opaque, as it's important for properly
/// restoring specialization lambda sets. As such, we need to export implementation information,
/// which is the job of this structure.
pub type ResolvedImplementations = VecMap<ImplKey, ResolvedImpl>;
/// The types of all exposed values/functions of a module. This includes ability member
/// specializations.
#[derive(Clone, Debug)]
pub struct ExposedModuleTypes {
pub exposed_types_storage_subs: ExposedTypesStorageSubs,
pub resolved_specializations: ResolvedSpecializations,
pub resolved_implementations: ResolvedImplementations,
}
#[derive(Debug)]