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 tuple types #41

Merged
merged 2 commits into from
Aug 20, 2023
Merged

Fix tuple types #41

merged 2 commits into from
Aug 20, 2023

Conversation

chuwy
Copy link
Contributor

@chuwy chuwy commented Aug 7, 2023

I just noticed that patterns like (Nat, Nat) produce an error.

I'm not 100% sure it's a good idea to combine (Optional Nat) and (Nat, Nat) as it feels lossy, but it repeats the pattern we have in terms.

@kylegoetz
Copy link
Owner

Thanks! I'll write a couple regression tests and likely merge.

I forget in this specific scenario why we have the "tuple_or_parenthetical" but generally it has to do with it being impossible from just parsing to tell the difference between

(1-tuple) and (1-item parenthetical)

To tell the difference, you need access to types that a simple parser can't give you.

@kylegoetz kylegoetz mentioned this pull request Aug 20, 2023
Copy link
Owner

@kylegoetz kylegoetz left a comment

Choose a reason for hiding this comment

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

LGTM!

@kylegoetz kylegoetz merged commit 0c6b76e into kylegoetz:master Aug 20, 2023
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.

None yet

2 participants