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

[derive] Add some missing universe constraints #754

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/derive/elpi/param2.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ dispatch (const GR as C) Suffix Clauses :- do! [

param Ty _ TyR,
coq.mk-app TyR [Term, Term] TyRTermTerm,
% coq.typecheck is needed to add universe constraints
std.assert-ok! (coq.typecheck TyRTermTerm _) "param2: illtyped param type",
param X _ XR,
% apparently calling the type checker with the expected type is weaker in this case
std.assert-ok! (coq.typecheck XR XRTy) "param2: illtyped constant",
Expand Down
7 changes: 7 additions & 0 deletions apps/derive/tests/test_param2.v
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ Elpi derive.param2 bla.
Fixpoint silly (n : nat) := n.
Elpi derive.param2 silly.

Definition size_of (A : Type) := A -> nat.

Definition size_seq (A : Type) : size_of (list A) := fun _ => 0.

Elpi derive.param2 size_of.

Elpi derive.param2 size_seq. (* Fixed by https://github.com/LPCIC/coq-elpi/pull/754 *)
Loading