johnynek / bosatsu

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

Support polymorphic recursion #1041

Closed johnynek closed 11 months ago

johnynek commented 12 months ago

This make monomorphization very hard (if not impossible) but removing this if we decide we really want monomorphization can be done.

In the mean time, I'm interested in exploring more powerful recursions that still provable terminate, and some examples I've hit require polymorphic recursion.

codecov-commenter commented 12 months ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.09% :tada:

Comparison is base (dd86eea) 91.74% compared to head (d43c6b7) 91.83%.

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1041 +/- ## ========================================== + Coverage 91.74% 91.83% +0.09% ========================================== Files 91 91 Lines 9487 9496 +9 Branches 2224 2241 +17 ========================================== + Hits 8704 8721 +17 + Misses 783 775 -8 ``` | [Files Changed](https://app.codecov.io/gh/johnynek/bosatsu/pull/1041?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/1041?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.83% <100.00%> (+0.69%)` | :arrow_up: | | [.../main/scala/org/bykn/bosatsu/SourceConverter.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1041?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%> (ø)` | | | [.../src/main/scala/org/bykn/bosatsu/rankn/Infer.scala](https://app.codecov.io/gh/johnynek/bosatsu/pull/1041?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.63% <100.00%> (-0.17%)` | :arrow_down: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/johnynek/bosatsu/pull/1041/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.