mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Merge branch 'main' into lower-module-params
This commit is contained in:
commit
3c679f6338
115 changed files with 2013 additions and 2846 deletions
|
@ -2329,6 +2329,7 @@ fn update<'a>(
|
|||
extend_module_with_builtin_import(parsed, ModuleId::DECODE);
|
||||
extend_module_with_builtin_import(parsed, ModuleId::HASH);
|
||||
extend_module_with_builtin_import(parsed, ModuleId::INSPECT);
|
||||
extend_module_with_builtin_import(parsed, ModuleId::TASK);
|
||||
}
|
||||
|
||||
state
|
||||
|
@ -3568,7 +3569,6 @@ fn load_builtin_module_help<'a>(
|
|||
header_type: HeaderType::Builtin {
|
||||
name: header::ModuleName::new(name_stem),
|
||||
exposes: unspace(arena, header.exposes.items),
|
||||
generates_with: &[],
|
||||
opt_params: header.params,
|
||||
},
|
||||
module_comments: comments,
|
||||
|
@ -3651,6 +3651,7 @@ fn load_module<'a>(
|
|||
"Decode", ModuleId::DECODE
|
||||
"Hash", ModuleId::HASH
|
||||
"Inspect", ModuleId::INSPECT
|
||||
"Task", ModuleId::TASK
|
||||
}
|
||||
|
||||
let (filename, opt_shorthand) = module_name_to_path(src_dir, &module_name, arc_shorthands);
|
||||
|
@ -3886,8 +3887,6 @@ fn parse_header<'a>(
|
|||
header_type: HeaderType::Hosted {
|
||||
name: header.name.value,
|
||||
exposes: unspace(arena, header.exposes.item.items),
|
||||
generates: header.generates.item,
|
||||
generates_with: unspace(arena, header.generates_with.item.items),
|
||||
},
|
||||
module_comments: comments,
|
||||
header_imports: Some(header.imports),
|
||||
|
@ -5197,6 +5196,7 @@ fn canonicalize_and_constrain<'a>(
|
|||
| ModuleId::SET
|
||||
| ModuleId::HASH
|
||||
| ModuleId::INSPECT
|
||||
| ModuleId::TASK
|
||||
);
|
||||
|
||||
if !name.is_builtin() || should_include_builtin {
|
||||
|
|
|
@ -25,4 +25,5 @@ pub const BUILTIN_MODULES: &[(ModuleId, &str)] = &[
|
|||
(ModuleId::DECODE, "Decode"),
|
||||
(ModuleId::HASH, "Hash"),
|
||||
(ModuleId::INSPECT, "Inspect"),
|
||||
(ModuleId::TASK, "Task"),
|
||||
];
|
||||
|
|
|
@ -93,6 +93,7 @@ impl Default for ModuleCache<'_> {
|
|||
DECODE,
|
||||
HASH,
|
||||
INSPECT,
|
||||
TASK,
|
||||
}
|
||||
|
||||
Self {
|
||||
|
|
|
@ -2151,7 +2151,7 @@ fn roc_file_no_extension() {
|
|||
indoc!(
|
||||
r#"
|
||||
app "helloWorld"
|
||||
packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.14.0/dC5ceT962N_4jmoyoffVdphJ_4GlW3YMhAPyGPr-nU0.tar.br" }
|
||||
packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.15.0-testing/libzR-AkVEn_dTBg2bKuXqMNZ9rYEfz3HSEQU8inoGk.tar.br" }
|
||||
imports [pf.Stdout]
|
||||
provides [main] to pf
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue