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

Better union #42

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Better union #42

merged 3 commits into from
Jan 29, 2024

Conversation

solnic
Copy link
Owner

@solnic solnic commented Jan 29, 2024

This simplifies evaluation of the union type, so that right side is only applied if the primitive type check on the left side failed. This only works like that if both sides are primitive types, otherwise we must always try to apply both sides.

It's better to evaluate right side only if left side primitive check
failed, because only this type of failure means that maybe we have an
input that matches right-side specificiation.
@solnic solnic added this to the v0.2.0 milestone Jan 29, 2024
@solnic solnic merged commit acd6268 into main Jan 29, 2024
9 checks passed
@solnic solnic deleted the better-union branch January 29, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant