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

Unbound variable #220

Open
tsani opened this issue May 31, 2020 · 1 comment
Open

Unbound variable #220

tsani opened this issue May 31, 2020 · 1 comment
Labels
A | core affecting the typechecker B | bug unexpected or incorrect behaviour P | low low priority issue

Comments

@tsani
Copy link
Contributor

tsani commented May 31, 2020

Load this signature.

kind : type.
con : type.

lam : kind -> (con -> con) -> con.
app : con -> con -> con.

cn-of : con -> kind -> type.
cn-equiv : con -> con -> kind -> type.

cn-equiv/beta : cn-of C1 K1 ->
                  (cn-of a K1 -> cn-of (C2 a) (K2 a)) ->
                  cn-equiv (app (lam K1 C2) C1) (C2 C1) (K2 C1). % Unbound identifier K2.

Beluga reports an error on the commented line, saying K2 is unbound. This variable is free and should have been automatically abstracted!

@tsani tsani added B | bug unexpected or incorrect behaviour A | core affecting the typechecker P | high high-priority issues labels May 31, 2020
@tsani tsani self-assigned this May 31, 2020
@tsani
Copy link
Contributor Author

tsani commented May 31, 2020

This issue is less serious than I first thought. Binding a in the right place gives

kind : type.
con : type.

lam : kind -> (con -> con) -> con.
app : con -> con -> con.

cn-of : con -> kind -> type.
cn-equiv : con -> con -> kind -> type.

cn-equiv/beta : cn-of C1 K1 ->
                  ({a : con} cn-of a K1 -> cn-of (C2 a) (K2 a)) ->
                  cn-equiv (app (lam K1 C2) C1) (C2 C1) (K2 C1).

and Beluga no longer complains about an unbound variable K2.

@tsani tsani added P | low low priority issue and removed P | high high-priority issues labels May 31, 2020
@tsani tsani removed their assignment Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A | core affecting the typechecker B | bug unexpected or incorrect behaviour P | low low priority issue
Projects
None yet
Development

No branches or pull requests

1 participant