mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Move Int and Float modules into Num
This commit is contained in:
parent
d041355c1d
commit
88990c8711
26 changed files with 543 additions and 547 deletions
|
@ -300,7 +300,7 @@ fn desugar_field<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
// TODO move this desugaring to canonicalization, to avoid dealing with strings as much
|
||||
// TODO move this desugaring to canonicalization, so we can use Symbols instead of strings
|
||||
#[inline(always)]
|
||||
fn binop_to_function(binop: BinOp) -> (&'static str, &'static str) {
|
||||
use self::BinOp::*;
|
||||
|
@ -308,8 +308,8 @@ fn binop_to_function(binop: BinOp) -> (&'static str, &'static str) {
|
|||
match binop {
|
||||
Caret => (ModuleName::NUM, "pow"),
|
||||
Star => (ModuleName::NUM, "mul"),
|
||||
Slash => (ModuleName::FLOAT, "div"),
|
||||
DoubleSlash => (ModuleName::INT, "div"),
|
||||
Slash => (ModuleName::NUM, "div"),
|
||||
DoubleSlash => (ModuleName::NUM, "divFloor"),
|
||||
Percent => (ModuleName::NUM, "rem"),
|
||||
DoublePercent => (ModuleName::NUM, "mod"),
|
||||
Plus => (ModuleName::NUM, "add"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue