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

Remember the TyApply is always on a Rho #1081

Merged
merged 2 commits into from
Dec 11, 2023
Merged

Conversation

johnynek
Copy link
Owner

@johnynek johnynek commented Dec 11, 2023

This is an invariant I realized we were losing. since (forall x. C[x])[y] == (forall x. C[x, y]) we can always push formal out of TyApply and keep the left hand side a Rho type.

This makes it easier to reason about the types, but also does a minor performance improvement in Infer since we can leverage that the left is a Rho without having to pattern match again.

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (a4db25d) 92.42% compared to head (1dbc7d2) 92.40%.

Files Patch % Lines
.../src/main/scala/org/bykn/bosatsu/rankn/Infer.scala 77.77% 2 Missing ⚠️
...e/src/main/scala/org/bykn/bosatsu/rankn/Type.scala 96.66% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1081      +/-   ##
==========================================
- Coverage   92.42%   92.40%   -0.03%     
==========================================
  Files          93       93              
  Lines       10348    10372      +24     
  Branches     2475     2472       -3     
==========================================
+ Hits         9564     9584      +20     
- Misses        784      788       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnynek johnynek merged commit 48ed6ab into master Dec 11, 2023
13 checks passed
@johnynek johnynek deleted the oscar/20231211_tyapply_rho branch December 11, 2023 21:14
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