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

Spurious unification error when checking Dedukti file #1018

Open
rish987 opened this issue Nov 9, 2023 · 4 comments
Open

Spurious unification error when checking Dedukti file #1018

rish987 opened this issue Nov 9, 2023 · 4 comments

Comments

@rish987
Copy link
Member

rish987 commented Nov 9, 2023

The following Dedukti file contains a syntax error, but also reports a unification error that only appears when the syntax error (or any other error) is present:

A: Type.
B: Type.

a: A.

def f : B -> A -> A.

[] f _ (f _ _) --> a.

[] f _ _ --> a.

: (; produces error ;)

This is the error:

$ lambdapi check test.dk --lib-root=.
Checking "test.dk" ...
[test.dk:12:0-1] [A] and [B] are not unifiable.
Unexpected token ":".

dk check only reports the syntax error (and succeeds when it is removed):

$ dk check test.dk
[ERROR CODE:702]  [test.dk] [line:12 column:0] 
Parsing error: Unexpected token ':'.
@fblanqui
Copy link
Member

I cannot reproduce your error. I works for me with lambdapi 2.4.0 and master.
Which version of lambdapi do you use?
Perhaps you have some hidden invalid character in your file?

@rish987
Copy link
Member Author

rish987 commented Nov 13, 2023

That's odd. I just updated to lambdapi 2.4.0 from lambdapi 2.1.0, but was still able to reproduce the error. I also was able to reproduce it with a fresh install of lambdapi 2.4.0 on a separate machine.

@rish987 rish987 closed this as completed Nov 13, 2023
@rish987 rish987 reopened this Nov 13, 2023
@fblanqui
Copy link
Member

I see now. The problem is caused by the colon at the end. This is strange indeed.

@rish987
Copy link
Member Author

rish987 commented Nov 13, 2023

Yes, in fact, any error that results in error output will show it (syntax error, typing error, etc.).

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

No branches or pull requests

2 participants