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

do not generalize the type of every sub-pattern, only of variables #1745

Merged
merged 2 commits into from May 4, 2018

Conversation

Projects
None yet
2 participants
@trefis
Copy link
Contributor

commented Apr 30, 2018

As I said on #1675:

in type_cases when propagate is true [...] we pull the type of every pattern (i.e. including subpatterns) to the level of the match, before trying to generalize it.
[...]
However, if I understand correctly, we don't actually need to lift & generalize the type of every subpattern, only of things added to the environment (i.e. variables).

And I mentioned it again here : #1735 (comment) , where @garrigue seemed to agree.

@lpw25

lpw25 approved these changes Apr 30, 2018

Copy link
Contributor

left a comment

This looks correct and the idea behind the change is fine.

@trefis trefis force-pushed the trefis:generalize-var branch from d9c8818 to 2335811 May 4, 2018

@trefis trefis merged commit 3d32ac7 into ocaml:trunk May 4, 2018

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@trefis trefis deleted the trefis:generalize-var branch May 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.