app [main!] { pf: platform "../test/fx/platform/main.roc" }
import pf.Stdout
import pf.Stdin
main! = || {
count = get_two()
Stdout.line!(count)
}
get_two = || {
var $val = 1
$val = $val + 1
$val
}
output:
-- MISSING METHOD --------------------------------
This from_numeral method is being called on a value whose type doesn't have that method:
┌─ AOC/playground.roc:14:19
│
14 │ $val = $val + 1
│ ^
The value's type, which does not have a method named from_numeral, is:
Str
Hint: For this to work, the type would need to have a method named from_numeral associated with it in the type's declaration.
also added it as gh issue: #8570
I will investigate it a bit myself. I let you know how it goes.
the error message is confusing, but the reason it's erroring is that Stdout.line! takes a string and not a number :sweat_smile:
that makes a lot of sense. Interstingly with this one:
app [main!] { pf: platform "../test/fx/platform/main.roc" }
import pf.Stdout
import pf.Stdin
main! = || {
count = get_two()
Stdout.line!(U64.to_str(count))
}
get_two = || {
var $val = 1
$val = $val + 1
$val
}
I get the output 2000000000000000000
dbg count gives 2, so probably something with to_str?
yeah seems like it!
Last updated: Dec 21 2025 at 12:15 UTC