Is it broken or am I missing something?
it always gives me a panic:
../roc_nightly-linux_x86_64-2024-01-03-b1f7316/roc repl
Enter an expression, or :help, or :q to quit.
» Num.sqrt 4.0
thread 'main' panicked at 'internal error: entered unreachable code: invalid layout for sqrt', crates/compiler/gen_dev/src/lib.rs:1391:26
Most likely broken, may be not yet implemented for that architecture. Might be worth logging an issue for it, if there isn't one.
it seems the same for Num.pow (and maybe others). I'm happy to fix them if it's just a trivial issue with my arch (linux_x86_64). but I need a nudge in the right direction.
Yep, it definitely crashes on x86_64 with the same message for sqrt. However, the error for Num.pow is different: 'not yet implemented: low level, NumPow'
Reading https://github.com/roc-lang/roc/issues/6208 the issue is not so trivial. There is a workaround tho, just cast to f64
Last updated: Jul 06 2025 at 12:14 UTC