johnynek / bosatsu

A python-ish pure and total functional programming language
Apache License 2.0
223 stars 11 forks source link

Remember the TyApply is always on a Rho #1081

Closed johnynek closed 7 months ago

johnynek commented 7 months ago

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 commented 7 months ago

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 :warning:
...e/src/main/scala/org/bykn/bosatsu/rankn/Type.scala 96.66% 1 Missing :warning:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.