mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Import both specializations and declared ability mappings
This commit is contained in:
parent
cd0b8577ab
commit
0525c6d616
5 changed files with 159 additions and 86 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::abilities::{MemberSpecializationInfo, PendingAbilitiesStore, Resolved};
|
||||
use crate::abilities::{ImplKey, PendingAbilitiesStore, ResolvedImpl};
|
||||
use crate::annotation::canonicalize_annotation;
|
||||
use crate::def::{canonicalize_defs, Def};
|
||||
use crate::effect_module::HostedGeneratedFunctions;
|
||||
|
@ -103,14 +103,20 @@ impl ExposedForModule {
|
|||
}
|
||||
}
|
||||
|
||||
pub type ResolvedSpecializations = VecMap<Symbol, MemberSpecializationInfo<Resolved>>;
|
||||
/// 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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue