Automaton i o : { step : i -> Automaton i o, o }
Gives this error:
> ── CYCLIC ALIAS ───────────────────────────────────────────────────── main.roc ─
The Automaton alias is self-recursive in an invalid way:
14│ Automaton i o : { step : i -> Automaton i o, o }
What would be a valid way?
Ah ha!
Automaton i o : [ Arrow (i -> o), Step (i -> Automaton i o, o) ]
Perhaps the error message should say that recursion is possible with at least one ground tag?
njlr has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC