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 #1704 #1711
Fix #1704 #1711
Conversation
janmasrovira
commented
Jan 9, 2023
•
edited by jonaprieto
edited by jonaprieto
- Fixes Type synonyms are not always unfolded during type checking #1704
44f6d92
to
e6b86a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't entirely solve the problem. The synonyms are still sometimes not unfolded, e.g., when type-checking a function application.
Checking the module:
module church;
open import Stdlib.Prelude;
Num : Type;
Num := {A : Type} → (A → A) → A → A;
czero : Num;
czero {_} f x := x;
csuc : Num → Num;
csuc n {_} f := f ∘ n f;
end;
results in an error:
Type error near church.juvix:12:21-24.
In the expression:
n f
the expression n is expected to have a function type but has type:
Num
e6b86a2
to
19a3638
Compare
19a3638
to
96bbd9f
Compare
The above is now solved, however, you need to provide the implicit argument of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, seems to be working now. I can do Church numerals with type synonyms.