From e16f2bbc017933b83385942bb83d23151495f0f1 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 6 Dec 2023 18:19:27 +0100 Subject: [PATCH] Num.maxNat does not exist Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- crates/compiler/builtins/roc/Num.roc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/compiler/builtins/roc/Num.roc b/crates/compiler/builtins/roc/Num.roc index 2e72ce7f0c0..2249cd72c22 100644 --- a/crates/compiler/builtins/roc/Num.roc +++ b/crates/compiler/builtins/roc/Num.roc @@ -1433,12 +1433,11 @@ toU32 : Int * -> U32 toU64 : Int * -> U64 toU128 : Int * -> U128 -## Converts an [Int] to a [Nat]. If the given number doesn't fit in [Nat], it will be truncated. +## Converts an [Int] to a [Nat]. If the given number doesn't fit in [Nat], it will be truncated! ## Since [Nat] has a different maximum number depending on the system you're building ## for, this may give a different answer on different systems. ## -## For example, on a 32-bit system, `Num.maxNat` will return the same answer as -## `Num.maxU32`. This means that calling `Num.toNat 9_000_000_000` on a 32-bit +## For example, on a 32-bit system, calling `Num.toNat 9_000_000_000` on a 32-bit ## system will return `Num.maxU32` instead of 9 billion, because 9 billion is ## higher than `Num.maxU32` and will not fit in a [Nat] on a 32-bit system. ##