Skip to content

Commit 6441735

Browse files
authored
Merge pull request #603 from proux01/coq-master+adapt-coq-pr18397-declare_variable-api
2 parents c463aa1 + 4169830 commit 6441735

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/coq_elpi_builtins.ml

+4-4
Original file line numberDiff line numberDiff line change
@@ -874,19 +874,19 @@ let add_axiom_or_variable api id ty local options state =
874874
let kind = Decls.Logical in
875875
let impargs = [] in
876876
let loc = to_coq_loc @@ State.get Coq_elpi_builtins_synterp.invocation_site_loc state in
877-
let variable = CAst.(make ~loc @@ Id.of_string id) in
877+
let id = Id.of_string id in
878+
let variable = CAst.(make ~loc id) in
878879
if not (is_ground sigma ty) then
879880
err Pp.(str"coq.env.add-const: the type must be ground. Did you forge to call coq.typecheck-indt-decl?");
880881
let gr, _ =
881882
if local then begin
882-
ComAssumption.declare_variable Vernacexpr.NoCoercion ~kind (EConstr.to_constr sigma ty) uentry impargs Glob_term.Explicit variable;
883883
Dumpglob.dump_definition variable true "var";
884-
GlobRef.VarRef(Id.of_string id), UVars.Instance.empty
884+
ComAssumption.declare_variable Vernacexpr.NoCoercion ~kind (EConstr.to_constr sigma ty) uentry impargs Glob_term.Explicit id
885885
end else begin
886886
Dumpglob.dump_definition variable false "ax";
887887
ComAssumption.declare_axiom Vernacexpr.NoCoercion ~local:Locality.ImportDefaultBehavior ~kind (EConstr.to_constr sigma ty)
888888
uentry impargs options.inline
889-
variable
889+
id
890890
end
891891
in
892892
gr

0 commit comments

Comments
 (0)