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

Adapt to Coq PR #18253: poly flag is spurious on try_add_new_coercion #533

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: 1 addition & 1 deletion elpi-builtin.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ not _.

% [declare_constraint C Key1 Key2...] declares C blocked
% on Key1 Key2 ... (variables, or lists thereof).
external type declare_constraint any -> any -> variadic any prop.
external type declare_constraint variadic any prop.

external pred print_constraints. % prints all constraints

Expand Down
7 changes: 3 additions & 4 deletions src/coq_elpi_builtins.ml
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ let add_axiom_or_variable api id ty local options state =
GlobRef.VarRef(Id.of_string id), Univ.Instance.empty
end else begin
Dumpglob.dump_definition variable false "ax";
ComAssumption.declare_axiom Vernacexpr.NoCoercion ~local:Locality.ImportDefaultBehavior ~poly:false ~kind (EConstr.to_constr sigma ty)
ComAssumption.declare_axiom Vernacexpr.NoCoercion ~local:Locality.ImportDefaultBehavior ~kind (EConstr.to_constr sigma ty)
uentry impargs options.inline
variable
end
Expand Down Expand Up @@ -2750,15 +2750,14 @@ NParams can always be omitted, since it is inferred.
- @reversible! (default: false)|})),
(fun (gr, _, source, target) ~depth { options } _ -> grab_global_env "coq.coercion.declare" (fun state ->
let local = options.local <> Some false in
let poly = false in
let reversible = options.reversible = Some true in
begin match source, target with
| B.Given source, B.Given target ->
let source = ComCoercion.class_of_global source in
ComCoercion.try_add_new_coercion_with_target gr ~local ~poly
ComCoercion.try_add_new_coercion_with_target gr ~local
~reversible ~source ~target
| _, _ ->
ComCoercion.try_add_new_coercion gr ~local ~poly ~reversible
ComCoercion.try_add_new_coercion gr ~local ~reversible
end;
state, (), []))),
DocAbove);
Expand Down