Stream: bugs

Topic: bugs with early return followed by effectful functions


view this post on Zulip Dan G Knutson (Nov 15 2024 at 23:35):

When working on roc-ray examples, I ran into what looks like a couple of bugs with try and ? early returns with effectful functions. It seems like the backpassing-style continuation that gets generated is required to be pure. When using ? this makes multiple early returns from fallible effectful functions into a compile error. When using try, roc check passes but roc build crashes.

These are two minimal-ish repros in roc-ray examples. They can be run with:

just dev examples/early-return-question-mark.roc
just dev examples/early-return-try.roc

Edit: I made a github issue

view this post on Zulip Sam Mohr (Nov 15 2024 at 23:44):

Known issue, I'll try to crack out a fix this weekend. Thanks for reporting, I kept saying I'd do it but didn't get around to it


Last updated: Jul 06 2025 at 12:14 UTC