You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To create a tree structure, I would like to be able to write:
Tree : { name: Str, other: U64, children: ListTree}
Right now this fails because the compiler could thinks it's an infinitely récursive type. But clearly an empty children list can end the recursion. In fact, any container type that can be empty should be able to end the recursion.
This feature would make many recursive types like this one much more pleasant to work with. Right now I have to use two tags, and my code is littered with when, most of which serve no purpose other than ignoring the Empty tag.
The text was updated successfully, but these errors were encountered:
To create a tree structure, I would like to be able to write:
Right now this fails because the compiler could thinks it's an infinitely récursive type. But clearly an empty
children
list can end the recursion. In fact, any container type that can be empty should be able to end the recursion.This feature would make many recursive types like this one much more pleasant to work with. Right now I have to use two tags, and my code is littered with
when
, most of which serve no purpose other than ignoring theEmpty
tag.The text was updated successfully, but these errors were encountered: