Stream: bugs

Topic: Another e_closure error


view this post on Zulip Matthieu Pizenberg (Dec 03 2025 at 19:10):

Gotta catch them all! https://github.com/roc-lang/roc/issues/8559

main! = || {
    if True {
        x = 0
        _y = x
    }
}

If we fix the segfault in https://github.com/roc-lang/roc/issues/8553 we’ll have part 1 of AoC day 2 working. But to get part 2 working, we’d need to fix this e_closure error too I think. I haven’t found a workaround.

view this post on Zulip Richard Feldman (Dec 03 2025 at 23:06):

I'm on this!

view this post on Zulip Richard Feldman (Dec 04 2025 at 05:19):

https://github.com/roc-lang/roc/pull/8564 fixed this

view this post on Zulip Matthieu Pizenberg (Dec 04 2025 at 08:19):

Thanks! It solved the errors on list equality. However the e_closure error on the example above is still present. https://github.com/roc-lang/roc/issues/8559

view this post on Zulip Matthieu Pizenberg (Dec 04 2025 at 08:24):

Also, I found another bug that triggers when there is a comparison of string list. I opened another issue https://github.com/roc-lang/roc/issues/8567
Here is the example:

main! = || {
    a = ["a"]
    if (a == a) {
        Stdout.line!("Ok")
    } else {
        Stdout.line!("PROBLEM")
    }
}

view this post on Zulip Matthieu Pizenberg (Dec 04 2025 at 08:26):

This example gives me:

Roc crashed: Failed to compare numeric scalars

view this post on Zulip Matthieu Pizenberg (Dec 04 2025 at 17:49):

Created this PR which fixes the e_closure error: https://github.com/roc-lang/roc/pull/8571

view this post on Zulip Matthieu Pizenberg (Dec 04 2025 at 20:08):

Ok, I also have the fix for that string comparison error. Preparing another PR now.

view this post on Zulip Matthieu Pizenberg (Dec 04 2025 at 20:16):

Here is the second PR: https://github.com/roc-lang/roc/pull/8572

view this post on Zulip Matthieu Pizenberg (Dec 04 2025 at 20:25):

I’m now so close to getting AoC day2 working and now just hit a new segfault XD. I’ll try to minimize it after dinner.


Last updated: Dec 21 2025 at 12:15 UTC