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

Add pattern matching for records #108

Merged
merged 8 commits into from Mar 26, 2024
Merged

Add pattern matching for records #108

merged 8 commits into from Mar 26, 2024

Conversation

siddharth-krishna
Copy link
Collaborator

This PR follows up on #103 by adding pattern matching for records. E.g.

let f = fun r -> match r with { | {x = x; y = y} -> x + y } in f {x = 3.3; y = 5.1}

It also adds a type error when record literals or patterns use duplicate field names.

@siddharth-krishna siddharth-krishna merged commit 02bb23a into main Mar 26, 2024
1 check passed
@siddharth-krishna siddharth-krishna deleted the sidk-record-pats branch March 26, 2024 18:35
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