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

Fix arity checker bug #1546

Merged
merged 6 commits into from
Sep 26, 2022
Merged

Fix arity checker bug #1546

merged 6 commits into from
Sep 26, 2022

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Sep 22, 2022

Depends on #1538.

The following fails to arity check:

inductive Box (A : Type) {
  b : A → Box A;
};

x : Box ((A : Type) → A → A);
x := b λ {A a := a};

The issue is that when arity checking an application, we were first checking the arguments and then adding the holes. As an unwanted consequence, the arguments could be assigned an incorrect arity. Now this is fixed

The pr also includes pretty printing for arities, which was useful during the debugging.

@janmasrovira janmasrovira added this to the 0.2.6 milestone Sep 22, 2022
@janmasrovira janmasrovira self-assigned this Sep 22, 2022
@janmasrovira janmasrovira marked this pull request as ready for review September 23, 2022 14:37
@lukaszcz lukaszcz merged commit 13b038b into main Sep 26, 2022
@lukaszcz lukaszcz deleted the fix-arity-checker branch September 26, 2022 12:39
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.

2 participants