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

Let Term #979

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Let Term #979

wants to merge 5 commits into from

Conversation

HoshinoTented
Copy link
Contributor

  • Let Term and normalization
  • Nested interface for nested structure
  • LetPrettier for prettying let-like things

TODO:

  • rendering the type of the bind during rendering LetTerm. I may use Synthesizer, but where does the TyckState come from?

@codecov
Copy link

codecov bot commented May 27, 2023

Codecov Report

Merging #979 (efb446d) into main (7fb9a1b) will decrease coverage by 0.48%.
The diff coverage is 81.96%.

❗ Current head efb446d differs from pull request most recent head 74f77c9. Consider uploading reports for the commit 74f77c9 to get more accurate results

@@             Coverage Diff              @@
##               main     #979      +/-   ##
============================================
- Coverage     81.98%   81.50%   -0.48%     
+ Complexity     3475     3460      -15     
============================================
  Files           280      284       +4     
  Lines         10509    10557      +48     
  Branches       1271     1271              
============================================
- Hits           8616     8605      -11     
- Misses         1176     1223      +47     
- Partials        717      729      +12     
Impacted Files Coverage Δ
base/src/main/java/org/aya/core/term/Term.java 89.58% <ø> (ø)
base/src/main/java/org/aya/ref/GenerateKind.java 75.00% <0.00%> (-25.00%) ⬇️
...e/src/main/java/org/aya/prettier/CorePrettier.java 67.75% <16.66%> (-11.33%) ⬇️
base/src/main/java/org/aya/core/term/LetTerm.java 85.71% <85.71%> (ø)
...se/src/main/java/org/aya/prettier/LetPrettier.java 87.50% <87.50%> (ø)
base/src/main/java/org/aya/concrete/Expr.java 86.26% <90.00%> (+0.21%) ⬆️
base/src/main/java/org/aya/core/serde/SerTerm.java 81.37% <100.00%> (+0.37%) ⬆️
...e/src/main/java/org/aya/core/serde/Serializer.java 86.71% <100.00%> (+0.21%) ⬆️
...c/main/java/org/aya/core/visitor/BetaExpander.java 74.00% <100.00%> (+0.53%) ⬆️
base/src/main/java/org/aya/generic/Nested.java 100.00% <100.00%> (ø)
... and 3 more

... and 10 files with indirect coverage changes

Copy link
Member

@ice1000 ice1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! I'll go make some minor edits and merge this.

Gj!

base/src/main/java/org/aya/concrete/Expr.java Outdated Show resolved Hide resolved
@HoshinoTented
Copy link
Contributor Author

😢

@HoshinoTented
Copy link
Contributor Author

HoshinoTented commented May 29, 2023

What's wrong? Consider term[x |-> y] where term or y contains z and we have a defEq z |-> x, the substituted term still has x after normalization. And this sounds very hard to solve...

So I suspend this PR.

Possible solution: learn from Arend

bors bot added a commit that referenced this pull request May 30, 2023
982: Fix baka let and add some improvement r=HoshinoTented a=HoshinoTented

Goals:
+ [x] Nested interface for nested structure (copied from #979)
+ [x] Better prettier for lambda
+ [x] Fixes baka let which has redundant lambda

TODOs:
+ [ ] ~~Better prettier for Pi (if Goal#2 is good)~~ Pi is special

Co-authored-by: HoshinoTented <hoshinotented@qq.com>
@ice1000 ice1000 removed this from the v0.30 milestone May 27, 2024
@HoshinoTented
Copy link
Contributor Author

This feature may cost more than its benefit...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants