mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
fix some things in Num
This commit is contained in:
parent
4dafe08544
commit
e9f7427c67
3 changed files with 8 additions and 2 deletions
|
@ -140,6 +140,8 @@ interface Num
|
|||
toU64Checked,
|
||||
toU128,
|
||||
toU128Checked,
|
||||
toNat,
|
||||
toNatChecked,
|
||||
toF32,
|
||||
toF32Checked,
|
||||
toF64,
|
||||
|
@ -354,6 +356,7 @@ toU16 : Int * -> U16
|
|||
toU32 : Int * -> U32
|
||||
toU64 : Int * -> U64
|
||||
toU128 : Int * -> U128
|
||||
toNat : Int * -> Nat
|
||||
|
||||
toF32 : Num * -> F32
|
||||
toF64 : Num * -> F64
|
||||
|
@ -368,5 +371,6 @@ toU16Checked : Int * -> Result U16 [ OutOfBounds ]*
|
|||
toU32Checked : Int * -> Result U32 [ OutOfBounds ]*
|
||||
toU64Checked : Int * -> Result U64 [ OutOfBounds ]*
|
||||
toU128Checked : Int * -> Result U128 [ OutOfBounds ]*
|
||||
toNatChecked : Int * -> Result Nat [ OutOfBounds ]*
|
||||
toF32Checked : Num * -> Result F32 [ OutOfBounds ]*
|
||||
toF64Checked : Num * -> Result F64 [ OutOfBounds ]*
|
||||
|
|
|
@ -396,7 +396,7 @@ pub fn canonicalize_module_defs<'a>(
|
|||
if has_no_implementation(&def.loc_expr.value) {
|
||||
match generated_info {
|
||||
GeneratedInfo::Builtin {
|
||||
generated_functions,
|
||||
generated_functions: _,
|
||||
} => {
|
||||
let symbol = def.pattern_vars.iter().next().unwrap().0;
|
||||
match crate::builtins::builtin_defs_map(*symbol, var_store) {
|
||||
|
|
|
@ -2460,7 +2460,9 @@ fn foo<'a>(
|
|||
packages: &[],
|
||||
exposes: unspace(arena, header.exposes.items),
|
||||
imports: unspace(arena, header.imports.items),
|
||||
extra: HeaderFor::Interface,
|
||||
extra: HeaderFor::Builtin {
|
||||
generates_with: &[],
|
||||
},
|
||||
};
|
||||
|
||||
(info, parse_state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue