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

Fix support for nullary unstable functions #385

Merged

Conversation

saulshanabrook
Copy link
Member

This resolves #382 by adding parsing support for defining sorts of 0 argument unstable functions.

It does this by handling that input () as the Unit constructor.

If we ever want to remove the Unit constructor, we could move the return type to the list of argument types, to make sure it always has at least one value.

This would also make parsing it more similar to other datatypes.

For now I just kept it the same to make the change minimal.

This resolves egraphs-good#382 by adding parsing support for defining sorts of 0 argument
unstable functions.

It does this by handling that input `()` as the `Unit` constructor.

If we ever want to remove the Unit constructor, we could move the return type
to the list of argument types, to make sure it always has at least one value.

This would also make parsing it more similar to other datatypes.

For now I just kept it the same to make the change minimal.
@saulshanabrook saulshanabrook requested a review from a team as a code owner June 6, 2024 20:12
@saulshanabrook saulshanabrook requested review from mwillsey and removed request for a team June 6, 2024 20:12
@saulshanabrook saulshanabrook requested review from oflatt and removed request for mwillsey June 6, 2024 20:12
Copy link
Member

@oflatt oflatt left a comment

Choose a reason for hiding this comment

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

looks good to me

@saulshanabrook saulshanabrook merged commit 0da3209 into egraphs-good:main Jul 11, 2024
3 checks passed
@saulshanabrook saulshanabrook deleted the fix-nullary-unstable-fns branch July 11, 2024 22:53
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.

Fix Nullary Unstable Functions
2 participants