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

Declare compatibility constant as canonical gref for primitive projections #790

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Changes from 1 commit
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
1 change: 1 addition & 0 deletions elpi/coq-lib.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ coq.term->gref (global GR) GR :- !.
coq.term->gref (pglobal GR _) GR :- !.
coq.term->gref (app [Hd|_]) GR :- !, coq.term->gref Hd GR.
coq.term->gref (let _ _ T x\x) GR :- !, coq.term->gref T GR.
coq.term->gref (primitive (proj Proj _)) GR :- !, primitive-projection? Proj GR.
Copy link
Contributor

@gares gares Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
coq.term->gref (primitive (proj Proj _)) GR :- !, primitive-projection? Proj GR.
coq.term->gref (primitive (proj Proj _)) (con C) :- coq.env.primitive-projection? Proj C, !.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am surprised I did not see any error. Is it not const instead of con?

:name "term->gref:fail"
coq.term->gref Term _ :-
fatal-error-w-data "term->gref: input has no global reference" Term.
Expand Down
Loading