mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
List dependencies in the stdlib explicitly rather than hard-coding
This commit is contained in:
parent
0b57b00235
commit
5416eb7cbf
10 changed files with 69 additions and 17 deletions
|
@ -2232,24 +2232,15 @@ fn update<'a>(
|
|||
// add the prelude
|
||||
let mut header = header;
|
||||
|
||||
if ![ModuleId::RESULT, ModuleId::BOOL].contains(&header.module_id) {
|
||||
extend_header_with_builtin(&mut header, ModuleId::RESULT);
|
||||
}
|
||||
|
||||
if ![ModuleId::NUM, ModuleId::BOOL, ModuleId::RESULT].contains(&header.module_id) {
|
||||
extend_header_with_builtin(&mut header, ModuleId::NUM);
|
||||
}
|
||||
|
||||
if ![ModuleId::BOOL].contains(&header.module_id) {
|
||||
extend_header_with_builtin(&mut header, ModuleId::BOOL);
|
||||
}
|
||||
|
||||
if !header.module_id.is_builtin() {
|
||||
extend_header_with_builtin(&mut header, ModuleId::BOX);
|
||||
extend_header_with_builtin(&mut header, ModuleId::NUM);
|
||||
extend_header_with_builtin(&mut header, ModuleId::BOOL);
|
||||
extend_header_with_builtin(&mut header, ModuleId::STR);
|
||||
extend_header_with_builtin(&mut header, ModuleId::LIST);
|
||||
extend_header_with_builtin(&mut header, ModuleId::RESULT);
|
||||
extend_header_with_builtin(&mut header, ModuleId::DICT);
|
||||
extend_header_with_builtin(&mut header, ModuleId::SET);
|
||||
extend_header_with_builtin(&mut header, ModuleId::LIST);
|
||||
extend_header_with_builtin(&mut header, ModuleId::BOX);
|
||||
extend_header_with_builtin(&mut header, ModuleId::ENCODE);
|
||||
extend_header_with_builtin(&mut header, ModuleId::DECODE);
|
||||
extend_header_with_builtin(&mut header, ModuleId::HASH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue