mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
add VariableSizedTypes struct
This commit is contained in:
parent
2fb803cdd0
commit
d19223dfb3
2 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
use crate::env::Env;
|
use crate::env::Env;
|
||||||
use crate::scope::Scope;
|
use crate::scope::Scope;
|
||||||
use roc_collections::all::{ImMap, MutSet, SendMap};
|
use roc_collections::all::{ImMap, MutMap, MutSet, SendMap};
|
||||||
use roc_module::ident::{Ident, Lowercase, TagName};
|
use roc_module::ident::{Ident, Lowercase, TagName};
|
||||||
use roc_module::symbol::Symbol;
|
use roc_module::symbol::Symbol;
|
||||||
use roc_parse::ast::{AssignedField, Tag, TypeAnnotation};
|
use roc_parse::ast::{AssignedField, Tag, TypeAnnotation};
|
||||||
|
@ -58,6 +58,12 @@ impl IntroducedVariables {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Default)]
|
||||||
|
pub struct VariablySizedTypes {
|
||||||
|
rigids: MutMap<Lowercase, ()>,
|
||||||
|
aliases: MutMap<Symbol, ()>,
|
||||||
|
}
|
||||||
|
|
||||||
pub fn canonicalize_annotation(
|
pub fn canonicalize_annotation(
|
||||||
env: &mut Env,
|
env: &mut Env,
|
||||||
scope: &mut Scope,
|
scope: &mut Scope,
|
||||||
|
|
|
@ -5,6 +5,7 @@ use crossbeam::deque::{Injector, Stealer, Worker};
|
||||||
use crossbeam::thread;
|
use crossbeam::thread;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use roc_builtins::std::{Mode, StdLib};
|
use roc_builtins::std::{Mode, StdLib};
|
||||||
|
use roc_can::annotation::VariablySizedTypes;
|
||||||
use roc_can::constraint::Constraint;
|
use roc_can::constraint::Constraint;
|
||||||
use roc_can::def::Declaration;
|
use roc_can::def::Declaration;
|
||||||
use roc_can::module::{canonicalize_module_defs, Module};
|
use roc_can::module::{canonicalize_module_defs, Module};
|
||||||
|
@ -210,6 +211,7 @@ struct ModuleCache<'a> {
|
||||||
found_specializations: MutMap<ModuleId, FoundSpecializationsModule<'a>>,
|
found_specializations: MutMap<ModuleId, FoundSpecializationsModule<'a>>,
|
||||||
external_specializations_requested: MutMap<ModuleId, ExternalSpecializations>,
|
external_specializations_requested: MutMap<ModuleId, ExternalSpecializations>,
|
||||||
documentation: MutMap<ModuleId, ModuleDocumentation>,
|
documentation: MutMap<ModuleId, ModuleDocumentation>,
|
||||||
|
host_exposed_variably_sized_types: MutMap<Symbol, VariablySizedTypes>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn start_phase<'a>(module_id: ModuleId, phase: Phase, state: &mut State<'a>) -> BuildTask<'a> {
|
fn start_phase<'a>(module_id: ModuleId, phase: Phase, state: &mut State<'a>) -> BuildTask<'a> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue