Skip to content

Remove type_unpacks#150

Merged
goldfirere merged 5 commits intoocaml-flambda:mainfrom
ncik-roberts:typedtree-module-patterns.remove-type_unpacks
Mar 15, 2023
Merged

Remove type_unpacks#150
goldfirere merged 5 commits intoocaml-flambda:mainfrom
ncik-roberts:typedtree-module-patterns.remove-type_unpacks

Conversation

@ncik-roberts
Copy link
Copy Markdown
Contributor

This PR is a clone of ncik-roberts#1 --- things got in a bad state upon trying to merge that PR into the typedtree-module-patterns branch, and I found it most convenient to pull the commits out into a new PR against main. See that PR for discussion.

This PR indeed has the same diff as the already-reviewed PR; run this to confirm:

$ diff <(git diff af24f25 247163a) <(git diff 3825013 c8367c0)

In the parent PR we unified the `to_unpack` and `module_variable` types.  This left something to be desired, as the `module_variable` terminology remained in some places. This PR removes the `to_unpack` terminology in favor of calling it `module_variable`; this makes sense with the joint removal of `type_unpacks` and leads to parallel code to `pattern_variable`.
It's natural to want to call `add_module_variables`
within `type_pattern_list`; this comment clarifies why
we don't do that.

I found it clearer to also move the responsibility to call
`add_pattern_variables` outside of `type_pattern_list`, so
I make that change as well.
@ncik-roberts ncik-roberts requested a review from goldfirere March 15, 2023 16:01
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.

2 participants