roc
roc copied to clipboard
Encoding of fractions fails with compiler panic
Code:
...
main =
enc = 1.2 |> Encode.toBytes json
...
error:
thread '<unnamed>' panicked at crates/compiler/mono/src/ir.rs:6143:56:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
There was an unrecoverable error in the Roc compiler. The `roc check` command can sometimes give a more helpful error report than other commands.
Interestingly this works without a problem:
...
main =
enc = 1.2dec |> Encode.toBytes json
...