I wrote this and the compiler (latest nightly) simply crashes
main =
a = 1.5dec
Num.toStr a |> Stdout.line
But a=1.5dec
works fine in repl mode. Is this a known bug?
Interesting. I guess we have a bug in Dec toStr
That is at least what I suspect the most.
Work on m1 processor on main for me. Are you on an x86 machine?
yeah. x86 linux
dbg a
also crashes
So this may be the Dec alignment issue that we're just being discussed in compiler development. So it may be the case that we don't have a fix until the next llvm update. Cause the root cause is an llvm bug and it would be a significant hassle to work around it.
Why repl works?
Repl is the dev backend instead of llvm. That said, my guess here may be wrong. Could you file an issue on the repo?
Last updated: Jul 06 2025 at 12:14 UTC