Skip to content

Commit

Permalink
Merge pull request #533 from herbelin/coq-master+adapt-coq-pr18253-no…
Browse files Browse the repository at this point in the history
…-poly-for-coercion

Adapt to Coq PR #18253: poly flag is spurious on try_add_new_coercion
  • Loading branch information
ppedrot committed Nov 25, 2023
2 parents 9e23b0f + 9bb2338 commit b8752c6
Showing 1 changed file with 3 additions and 4 deletions.
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), UVars.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 @@ -2761,15 +2761,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

0 comments on commit b8752c6

Please sign in to comment.