johnynek / bosatsu

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

Simplify and unify free type variable handling #1040

Closed johnynek closed 12 months ago

johnynek commented 1 year ago

This changes to require that all expressions being type checked by Infer have no free type variables. The caller needs to put the bounds in the correct places by using Generic(_, _). This is done in SourceConverter rather than spreading the logic around.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.06% :warning:

Comparison is base (ec40f58) 91.80% compared to head (a927efe) 91.75%.

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1040 +/- ## ========================================== - Coverage 91.80% 91.75% -0.06% ========================================== Files 91 91 Lines 9487 9487 Branches 2172 2224 +52 ========================================== - Hits 8710 8705 -5 - Misses 777 782 +5 ``` | [Files Changed](https://app.codecov.io/gh/johnynek/bosatsu/pull/1040?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin) | Coverage Δ | | |---|---|---| | [core/src/main/scala/org/bykn/bosatsu/Expr.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1040?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L0V4cHIuc2NhbGE=) | `87.14% <100.00%> (+0.57%)` | :arrow_up: | | [.../main/scala/org/bykn/bosatsu/SourceConverter.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1040?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L1NvdXJjZUNvbnZlcnRlci5zY2FsYQ==) | `97.59% <100.00%> (+<0.01%)` | :arrow_up: | | [.../src/main/scala/org/bykn/bosatsu/rankn/Infer.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1040?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin#diff-Y29yZS9zcmMvbWFpbi9zY2FsYS9vcmcvYnlrbi9ib3NhdHN1L3JhbmtuL0luZmVyLnNjYWxh) | `95.79% <100.00%> (-0.05%)` | :arrow_down: | ... and [6 files with indirect coverage changes](https://app.codecov.io/gh/johnynek/bosatsu/pull/1040/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=P.+Oscar+Boykin)

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