mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
Add test module for derivers
This commit is contained in:
parent
f1fa29fcfc
commit
ccd78a560f
7 changed files with 329 additions and 70 deletions
|
@ -46,7 +46,7 @@ use roc_solve::module::SolvedModule;
|
|||
use roc_solve::solve;
|
||||
use roc_target::TargetInfo;
|
||||
use roc_types::solved_types::Solved;
|
||||
use roc_types::subs::{Subs, VarStore, Variable};
|
||||
use roc_types::subs::{ExposedTypesStorageSubs, Subs, VarStore, Variable};
|
||||
use roc_types::types::{Alias, AliasKind};
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
use std::collections::HashMap;
|
||||
|
@ -510,6 +510,7 @@ pub struct LoadedModule {
|
|||
pub dep_idents: IdentIdsByModule,
|
||||
pub exposed_aliases: MutMap<Symbol, Alias>,
|
||||
pub exposed_values: Vec<Symbol>,
|
||||
pub exposed_types_storage: ExposedTypesStorageSubs,
|
||||
pub sources: MutMap<ModuleId, (PathBuf, Box<str>)>,
|
||||
pub timings: MutMap<ModuleId, ModuleTiming>,
|
||||
pub documentation: MutMap<ModuleId, ModuleDocumentation>,
|
||||
|
@ -687,6 +688,7 @@ enum Msg<'a> {
|
|||
solved_subs: Solved<Subs>,
|
||||
exposed_vars_by_symbol: Vec<(Symbol, Variable)>,
|
||||
exposed_aliases_by_symbol: MutMap<Symbol, (bool, Alias)>,
|
||||
exposed_types_storage: ExposedTypesStorageSubs,
|
||||
dep_idents: IdentIdsByModule,
|
||||
documentation: MutMap<ModuleId, ModuleDocumentation>,
|
||||
abilities_store: AbilitiesStore,
|
||||
|
@ -1404,6 +1406,7 @@ fn state_thread_step<'a>(
|
|||
solved_subs,
|
||||
exposed_vars_by_symbol,
|
||||
exposed_aliases_by_symbol,
|
||||
exposed_types_storage,
|
||||
dep_idents,
|
||||
documentation,
|
||||
abilities_store,
|
||||
|
@ -1421,6 +1424,7 @@ fn state_thread_step<'a>(
|
|||
solved_subs,
|
||||
exposed_aliases_by_symbol,
|
||||
exposed_vars_by_symbol,
|
||||
exposed_types_storage,
|
||||
dep_idents,
|
||||
documentation,
|
||||
abilities_store,
|
||||
|
@ -2209,6 +2213,7 @@ fn update<'a>(
|
|||
solved_subs,
|
||||
exposed_vars_by_symbol: solved_module.exposed_vars_by_symbol,
|
||||
exposed_aliases_by_symbol: solved_module.aliases,
|
||||
exposed_types_storage: solved_module.exposed_types,
|
||||
dep_idents,
|
||||
documentation,
|
||||
abilities_store,
|
||||
|
@ -2663,6 +2668,7 @@ fn finish(
|
|||
solved: Solved<Subs>,
|
||||
exposed_aliases_by_symbol: MutMap<Symbol, Alias>,
|
||||
exposed_vars_by_symbol: Vec<(Symbol, Variable)>,
|
||||
exposed_types_storage: ExposedTypesStorageSubs,
|
||||
dep_idents: IdentIdsByModule,
|
||||
documentation: MutMap<ModuleId, ModuleDocumentation>,
|
||||
abilities_store: AbilitiesStore,
|
||||
|
@ -2697,6 +2703,7 @@ fn finish(
|
|||
exposed_aliases: exposed_aliases_by_symbol,
|
||||
exposed_values,
|
||||
exposed_to_host: exposed_vars_by_symbol.into_iter().collect(),
|
||||
exposed_types_storage,
|
||||
sources,
|
||||
timings: state.timings,
|
||||
documentation,
|
||||
|
@ -3738,7 +3745,7 @@ impl<'a> BuildTask<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn add_imports(
|
||||
pub fn add_imports(
|
||||
my_module: ModuleId,
|
||||
subs: &mut Subs,
|
||||
mut pending_abilities: PendingAbilitiesStore,
|
||||
|
@ -5013,7 +5020,7 @@ fn to_missing_platform_report(module_id: ModuleId, other: PlatformPath) -> Strin
|
|||
/// Generic number types (Num, Int, Float, etc.) are treated as `DelayedAlias`es resolved during
|
||||
/// type solving.
|
||||
/// All that remains are Signed8, Signed16, etc.
|
||||
fn default_aliases() -> roc_solve::solve::Aliases {
|
||||
pub fn default_aliases() -> roc_solve::solve::Aliases {
|
||||
use roc_types::types::Type;
|
||||
|
||||
let mut solve_aliases = roc_solve::solve::Aliases::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue