rename standard_library -> roc

This commit is contained in:
Folkert 2022-03-23 21:19:15 +01:00
parent ca16099e83
commit d607d6db05
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
11 changed files with 29 additions and 29 deletions

View file

@ -2,5 +2,5 @@
// See github.com/rtfeldman/roc/issues/800 for discussion of the large_enum_variant check. // See github.com/rtfeldman/roc/issues/800 for discussion of the large_enum_variant check.
#![allow(clippy::large_enum_variant)] #![allow(clippy::large_enum_variant)]
pub mod bitcode; pub mod bitcode;
pub mod standard_library; pub mod roc;
pub mod std; pub mod std;

View 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");

View file

@ -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");