Skip to content

PoC: Type spreads of regular variants in patterns #6720

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

Closed
wants to merge 3 commits into from

Conversation

zth
Copy link
Collaborator

@zth zth commented Apr 10, 2024

Moved to #6721

let path, decl = Typetexp.find_type env lid.loc lid.txt in
match decl with
| {type_kind = Type_variant constructors} -> (
(* TODO: Probably problematic that we don't account for type params here? *)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This whole fn would be good to get your eyes on @cristianoc . It's mostly copied and adapted to work on regular variants from the existing build_or_pat, that operates on polyvariants.

@zth zth requested a review from cristianoc April 10, 2024 07:38
@zth zth changed the base branch from master to 11.0_release April 10, 2024 12:31
@zth zth changed the base branch from 11.0_release to master April 10, 2024 12:31
@zth zth closed this Apr 10, 2024
@zth zth deleted the variant-pattern-matching-type-spreads branch April 29, 2025 09:06
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.

1 participant