Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow types defined with type keyword to be recursive. #2212

Open
spotandjake opened this issue Dec 1, 2024 · 0 comments
Open

Allow types defined with type keyword to be recursive. #2212

spotandjake opened this issue Dec 1, 2024 · 0 comments

Comments

@spotandjake
Copy link
Member

Currently we give an error Error: The type abbreviation TreeNode is cyclic on code such as:

type TreeNode = (Number, Option<TreeNode>, Option<TreeNode>)

we should probably support this being recursive interestingly enough the syntax:

type rec TreeNode = (Number, Option<TreeNode>, Option<TreeNode>)

doesn't cause a parsing or well formedness error leading me to believe that this might actually just be a bug rather than a missing feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant