Hi,
I'm getting an interesting message from the new compiler:
┌────────────────────┐
│ RECURSIVE DISPATCH ├─ This is_eq dispatch would have to call itself to satisfy its own type. ────────┐
└┬───────────────────┘ │
│ │
│ expect Op(Gte(TagSeverity(Error))) == parse([Field("severity"), Gte, Ident("error")])? │
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ │
└──────────────────────────────────────────────────────────── /home/simon/working/logq/Cli.roc:170:39 ┘
The dispatcher type is:
Query.Expr
Hint: Use a more specific result type, or add an associated function whose is_eq implementation does
not require the same dispatch on the same type.
Interestingly, this error goes away and the code works if I replace == with a direct call to .is_eq
Does anyone know what's going on here or has anyone else seen this kind of behaviour?
@Simon Redding can you share the full example by any chance?
logq.tar
Here you go.
This is the working version with == replaced by .is_eq in the tests.
roc --version
Roc compiler version nightly-2026-08-14-549b94e
@Simon Redding quick fix for now would be to add a type annotation for is_eq, but I'm working on a fix that will hopefully make it Just Work the way you originally wrote it
Thanks for jumping on this so quickly Richard.
Last updated: Sep 24 2026 at 15:59 UTC