Skip to content

Adding a check to avoid recursive type definitions#329

Open
rodrigogribeiro wants to merge 10 commits into
mainfrom
no-recursion-on-types
Open

Adding a check to avoid recursive type definitions#329
rodrigogribeiro wants to merge 10 commits into
mainfrom
no-recursion-on-types

Conversation

@rodrigogribeiro

Copy link
Copy Markdown
Collaborator
  • This PR adds a check which do not allow the declaration of recursive types (direct or indirect).
  • Add new tests and changes some tests to failing due to the use of recursive types.

* This PR adds a check which do not allow the declaration of recursive
types (direct or indirect).
* Add new tests and changes some tests to failing due to the use of
recursive types.
@rodrigogribeiro rodrigogribeiro requested review from Y-Nak and mbenke March 11, 2026 19:53

@mbenke mbenke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether just switching tests to 'expect failure' is the right way to go.

Also, we should think whether we want to allow recursive types in comptime.

Comment thread test/Cases.hs Outdated
Comment thread test/Cases.hs Outdated
Comment thread test/Cases.hs
@rodrigogribeiro rodrigogribeiro requested a review from mbenke March 12, 2026 17:56
Comment thread src/Solcore/Frontend/TypeInference/TcContract.hs
* Adding an example suggested by Y-Nak.
@rodrigogribeiro rodrigogribeiro requested a review from Y-Nak March 16, 2026 17:37
Comment thread src/Solcore/Frontend/TypeInference/TcContract.hs
Comment thread src/Solcore/Frontend/TypeInference/TcContract.hs
@rodrigogribeiro rodrigogribeiro force-pushed the no-recursion-on-types branch from 4797d14 to 186e3e1 Compare June 3, 2026 10:27
@rodrigogribeiro rodrigogribeiro requested a review from Y-Nak June 3, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants