mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
moved all crates into seperate folder + related path fixes
This commit is contained in:
parent
12ef03bb86
commit
eee85fa45d
1063 changed files with 92 additions and 93 deletions
32
crates/compiler/builtins/src/roc.rs
Normal file
32
crates/compiler/builtins/src/roc.rs
Normal file
|
@ -0,0 +1,32 @@
|
|||
use roc_module::symbol::ModuleId;
|
||||
|
||||
#[inline(always)]
|
||||
pub fn module_source(module_id: ModuleId) -> &'static str {
|
||||
match module_id {
|
||||
ModuleId::RESULT => RESULT,
|
||||
ModuleId::NUM => NUM,
|
||||
ModuleId::STR => STR,
|
||||
ModuleId::LIST => LIST,
|
||||
ModuleId::DICT => DICT,
|
||||
ModuleId::SET => SET,
|
||||
ModuleId::BOX => BOX,
|
||||
ModuleId::BOOL => BOOL,
|
||||
ModuleId::ENCODE => ENCODE,
|
||||
ModuleId::JSON => JSON,
|
||||
_ => panic!(
|
||||
"ModuleId {:?} is not part of the standard library",
|
||||
module_id
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
const RESULT: &str = include_str!("../roc/Result.roc");
|
||||
const NUM: &str = include_str!("../roc/Num.roc");
|
||||
const STR: &str = include_str!("../roc/Str.roc");
|
||||
const LIST: &str = include_str!("../roc/List.roc");
|
||||
const DICT: &str = include_str!("../roc/Dict.roc");
|
||||
const SET: &str = include_str!("../roc/Set.roc");
|
||||
const BOX: &str = include_str!("../roc/Box.roc");
|
||||
const BOOL: &str = include_str!("../roc/Bool.roc");
|
||||
const ENCODE: &str = include_str!("../roc/Encode.roc");
|
||||
const JSON: &str = include_str!("../roc/Json.roc");
|
Loading…
Add table
Add a link
Reference in a new issue