I just tried something recursive and noticed the following:
The following checks:
LinkedList a : [ Nil, Cons ({ value: a, next: (LinkedList a)})]
But this does not check with a "cyclic alias" error:
LinkedList a : [ Nil, Cons (Node a)]
Node a : { value: a, next: (LinkedList a)}
Is this a bug, or is my understanding wrong?
I think bug. Could you file something on GitHub?
I think current roc has some limitations.
this is a known bug. unfortunately it is unlikely to be fixed soon. You can workaround it by inlining either “Node” or “LinkedList” into the other
Last updated: Jul 05 2025 at 12:14 UTC