mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Resolving conflicts with remote trunk
This commit is contained in:
commit
385d0fda9f
209 changed files with 29256 additions and 8806 deletions
|
@ -23,6 +23,10 @@ pub struct Lowercase(InlinableString);
|
|||
#[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct Uppercase(InlinableString);
|
||||
|
||||
/// A string representing a foreign (linked-in) symbol
|
||||
#[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Debug)]
|
||||
pub struct ForeignSymbol(InlinableString);
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub enum TagName {
|
||||
/// Global tags have no module, but tend to be short strings (since they're
|
||||
|
@ -125,6 +129,28 @@ impl<'a> Into<Box<str>> for ModuleName {
|
|||
}
|
||||
}
|
||||
|
||||
impl ForeignSymbol {
|
||||
pub fn as_str(&self) -> &str {
|
||||
&*self.0
|
||||
}
|
||||
|
||||
pub fn as_inline_str(&self) -> &InlinableString {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a str> for ForeignSymbol {
|
||||
fn from(string: &'a str) -> Self {
|
||||
Self(string.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<String> for ForeignSymbol {
|
||||
fn from(string: String) -> Self {
|
||||
Self(string.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl Uppercase {
|
||||
pub fn as_str(&self) -> &str {
|
||||
&*self.0
|
||||
|
|
|
@ -6,6 +6,8 @@ pub enum LowLevel {
|
|||
StrConcat,
|
||||
StrIsEmpty,
|
||||
StrStartsWith,
|
||||
StrSplit,
|
||||
StrCountGraphemes,
|
||||
ListLen,
|
||||
ListGetUnsafe,
|
||||
ListSet,
|
||||
|
@ -14,12 +16,14 @@ pub enum LowLevel {
|
|||
ListRepeat,
|
||||
ListReverse,
|
||||
ListConcat,
|
||||
ListContains,
|
||||
ListAppend,
|
||||
ListPrepend,
|
||||
ListJoin,
|
||||
ListMap,
|
||||
ListKeepIf,
|
||||
ListWalkRight,
|
||||
ListSum,
|
||||
NumAdd,
|
||||
NumAddWrap,
|
||||
NumAddChecked,
|
||||
|
@ -45,6 +49,8 @@ pub enum LowLevel {
|
|||
NumFloor,
|
||||
NumIsFinite,
|
||||
NumAtan,
|
||||
NumAcos,
|
||||
NumAsin,
|
||||
Eq,
|
||||
NotEq,
|
||||
And,
|
||||
|
|
|
@ -652,6 +652,8 @@ define_builtins! {
|
|||
42 NUM_ADD_WRAP: "addWrap"
|
||||
43 NUM_ADD_CHECKED: "addChecked"
|
||||
44 NUM_ATAN: "atan"
|
||||
45 NUM_ACOS: "acos"
|
||||
46 NUM_ASIN: "asin"
|
||||
}
|
||||
2 BOOL: "Bool" => {
|
||||
0 BOOL_BOOL: "Bool" imported // the Bool.Bool type alias
|
||||
|
@ -668,7 +670,9 @@ define_builtins! {
|
|||
2 STR_IS_EMPTY: "isEmpty"
|
||||
3 STR_APPEND: "append"
|
||||
4 STR_CONCAT: "concat"
|
||||
5 STR_STARTS_WITH: "startsWith"
|
||||
5 STR_SPLIT: "split"
|
||||
6 STR_COUNT_GRAPHEMES: "countGraphemes"
|
||||
7 STR_STARTS_WITH: "startsWith"
|
||||
}
|
||||
4 LIST: "List" => {
|
||||
0 LIST_LIST: "List" imported // the List.List type alias
|
||||
|
@ -689,6 +693,8 @@ define_builtins! {
|
|||
15 LIST_PREPEND: "prepend"
|
||||
16 LIST_JOIN: "join"
|
||||
17 LIST_KEEP_IF: "keepIf"
|
||||
18 LIST_CONTAINS: "contains"
|
||||
19 LIST_SUM: "sum"
|
||||
}
|
||||
5 RESULT: "Result" => {
|
||||
0 RESULT_RESULT: "Result" imported // the Result.Result type alias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue