mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Merge pull request #3589 from rtfeldman/can-abilities3
Canonicalize syntactic abilities: Part 3 - solving
This commit is contained in:
commit
6b6f240acb
21 changed files with 594 additions and 274 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue