mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
feat: Num.toStr
* add type for Num.toStr * create new lowlevel * delete types and Symbol for fromInt and fromFloat * leave LowLevel::{StrFromFloat,StrFromInt} * match on LowLevel::NumToStr and figure out the layout to decide which build function to delegate to
This commit is contained in:
parent
d67cc883ca
commit
f995a07029
8 changed files with 65 additions and 75 deletions
|
@ -108,6 +108,7 @@ pub enum LowLevel {
|
|||
NumShiftRightBy,
|
||||
NumShiftRightZfBy,
|
||||
NumIntCast,
|
||||
NumToStr,
|
||||
Eq,
|
||||
NotEq,
|
||||
And,
|
||||
|
@ -186,12 +187,10 @@ impl LowLevel {
|
|||
Symbol::STR_ENDS_WITH => Some(StrEndsWith),
|
||||
Symbol::STR_SPLIT => Some(StrSplit),
|
||||
Symbol::STR_COUNT_GRAPHEMES => Some(StrCountGraphemes),
|
||||
Symbol::STR_FROM_INT => Some(StrFromInt),
|
||||
Symbol::STR_FROM_UTF8 => None,
|
||||
Symbol::STR_FROM_UTF8_RANGE => None,
|
||||
Symbol::STR_TO_UTF8 => Some(StrToUtf8),
|
||||
Symbol::STR_REPEAT => Some(StrRepeat),
|
||||
Symbol::STR_FROM_FLOAT => Some(StrFromFloat),
|
||||
Symbol::STR_TRIM => Some(StrTrim),
|
||||
Symbol::STR_TRIM_LEFT => Some(StrTrimLeft),
|
||||
Symbol::STR_TRIM_RIGHT => Some(StrTrimRight),
|
||||
|
@ -268,6 +267,7 @@ impl LowLevel {
|
|||
Symbol::NUM_CEILING => Some(NumCeiling),
|
||||
Symbol::NUM_POW_INT => Some(NumPowInt),
|
||||
Symbol::NUM_FLOOR => Some(NumFloor),
|
||||
Symbol::NUM_TO_STR => Some(NumToStr),
|
||||
// => Some(NumIsFinite),
|
||||
Symbol::NUM_ATAN => Some(NumAtan),
|
||||
Symbol::NUM_ACOS => Some(NumAcos),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue