I'm trying to write a parser for AOC and something funky is happening when I try to run the test:
thread 'main' panicked at 'Error in alias analysis: error in module ModName("UserApp")
I distilled it down to this https://gist.github.com/axelerator/31e572261ef350eeb8205573a2507bc1
Does roc check
help with the error at all?
2 messages were moved here from #beginners > dbg not showing on roc test
by Brendan Hansknecht.
roc check
just complains about my unused imports :thinking:
I am not sure, but maybe @Luke Boswell or someone else that uses that parse library might have some ideas. Probably also worth filing an issue with that sample code.
I suspect the issue is List.join as thats not a combinator from the parser library. Im on my mobile so I cant check easily rn.
It is really weird. I wanted to try and see if I can at least pinpoint it better, but I failed I have a guess. If you change the list to oneOf
in parseRow
(either remove an element or change an element) the error disappears. If you add an expect
that uses parseNumber
or parseRow
, the error disappears as well. If, instead, you change the expect to use parseRow
instead of parseDot
, the error also disappears. My guess would be that some part of the compiler thinks that parseNumber
can be removed (rightly so), but another part tries to access it anyway. But I don't know the internals of the compiler, so that's just a guess. Hopefully that helps someone!
That error suggests to me it's lambda sets or something deep within the compiler and those are usually not easy bugs to find. If we could isolate this could be another good test case, but my concern is that there is a lot of layers here with the parser library. It's not something I probably have time too look at myself today. Basically we need to start with something broken, then keep deleting stuff until we have a minimal repro.
That doesn't really help @Axel get working code though unfortunately.
Also const [Dot]
doesn't look right to me. Maybe it should be const Dot |>
instead?
Last updated: Jul 05 2025 at 12:14 UTC