mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
rename standard_library -> roc
This commit is contained in:
parent
ca16099e83
commit
d607d6db05
11 changed files with 29 additions and 29 deletions
|
@ -2,5 +2,5 @@
|
|||
// See github.com/rtfeldman/roc/issues/800 for discussion of the large_enum_variant check.
|
||||
#![allow(clippy::large_enum_variant)]
|
||||
pub mod bitcode;
|
||||
pub mod standard_library;
|
||||
pub mod roc;
|
||||
pub mod std;
|
||||
|
|
28
compiler/builtins/src/roc.rs
Normal file
28
compiler/builtins/src/roc.rs
Normal file
|
@ -0,0 +1,28 @@
|
|||
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,
|
||||
_ => 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");
|
|
@ -1,28 +0,0 @@
|
|||
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,
|
||||
_ => panic!(
|
||||
"ModuleId {:?} is not part of the standard library",
|
||||
module_id
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
const RESULT: &str = include_str!("../standard_library/Result.roc");
|
||||
const NUM: &str = include_str!("../standard_library/Num.roc");
|
||||
const STR: &str = include_str!("../standard_library/Str.roc");
|
||||
const LIST: &str = include_str!("../standard_library/List.roc");
|
||||
const DICT: &str = include_str!("../standard_library/Dict.roc");
|
||||
const SET: &str = include_str!("../standard_library/Set.roc");
|
||||
const BOX: &str = include_str!("../standard_library/Box.roc");
|
||||
const BOOL: &str = include_str!("../standard_library/Bool.roc");
|
Loading…
Add table
Add a link
Reference in a new issue