I am running into a strange type error with a recursive function. I made a Minimum Reproducible Example here, with more context: https://github.com/roc-lang/roc/issues/6563
The error is strange: Value is: "Int a" ... needs to be ... "Int a"
I'm doing some recursion and some high level function passing too here - maybe it's a lambda set problem?
seems likely! @Ayaz Hafiz I know you're busy, but I'd like to look into this - any tips on how to use checkmate to debug something like this?
you could use checkmate; the documentation for it is here: https://roc.zulipchat.com/#narrow/stream/395097-compiler-development/topic/checkmate/near/380910750 and https://github.com/roc-lang/roc/blob/7d51d2b000c6de6aad647b4889ebb9e4c716cf7b/crates/compiler/checkmate/README.md#L1-L5
I would suggest trying this without type annotations first though. Does that work?
Running without type annotations does work! Wonderful! I've added that suggestion to the gh issue, but I didn't see any tags that seemed relevant to make this findable later. Any suggestions?
I would assume that it's lambdasets problem which is caused by different types generated for the generic Int a
. I encountered a very similar problem that was solved by removing the annotation, but can’t find if I reported it.
Last updated: Jul 05 2025 at 12:14 UTC