Skip to content

Commit 179b0fd

Browse files
committed
Rename soft_evaluable_of_global_reference -> evaluable_of_global_reference
1 parent 26768dd commit 179b0fd

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
overlay metarocq https://github.com/SkySkimmer/metarocq eval-ref 21669
2+
3+
overlay rewriter https://github.com/SkySkimmer/rewriter eval-ref 21669

plugins/ltac/tacintern.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ let evalref_of_globref ?loc r =
305305
in
306306
if not is_proof_variable then Dumpglob.add_glob ?loc r
307307
in
308-
Tacred.soft_evaluable_of_global_reference ?loc r
308+
Tacred.evaluable_of_global_reference ?loc r
309309

310310
let intern_smart_global ist = function
311311
| {v=AN r} -> intern_global_reference ist r

pretyping/tacred.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ let value_of_evaluable_ref env sigma evref u =
8484
| Evaluable.EvalProjectionRef _ ->
8585
assert false (* TODO *)
8686

87-
let soft_evaluable_of_global_reference ?loc = function
87+
let evaluable_of_global_reference ?loc = function
8888
| GlobRef.ConstRef cst ->
8989
begin
9090
match Structures.PrimitiveProjections.find_opt cst with
@@ -94,6 +94,8 @@ let soft_evaluable_of_global_reference ?loc = function
9494
| GlobRef.VarRef id -> Evaluable.EvalVarRef id
9595
| r -> error_not_evaluable ?loc r
9696

97+
let soft_evaluable_of_global_reference = evaluable_of_global_reference
98+
9799
let global_of_evaluable_reference = function
98100
| Evaluable.EvalConstRef cst -> GlobRef.ConstRef cst
99101
| Evaluable.EvalVarRef id -> GlobRef.VarRef id

pretyping/tacred.mli

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ val is_evaluable : Environ.env -> Evd.evar_map -> Evaluable.t -> bool
4242
exception NotEvaluableRef of GlobRef.t
4343
val error_not_evaluable : ?loc:Loc.t -> GlobRef.t -> 'a
4444

45-
val soft_evaluable_of_global_reference :
45+
val evaluable_of_global_reference :
4646
?loc:Loc.t -> GlobRef.t -> Evaluable.t
4747
(** Succeeds for any constant or variable even if marked opaque or otherwise not evaluable. *)
4848

49+
val soft_evaluable_of_global_reference :
50+
?loc:Loc.t -> GlobRef.t -> Evaluable.t
51+
[@@deprecated "(9.3) Use evaluable_of_global_reference."]
52+
4953
val global_of_evaluable_reference :
5054
Evaluable.t -> GlobRef.t
5155

tactics/redexpr.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ module Intern = struct
478478
in
479479
if not is_proof_variable then Dumpglob.add_glob ?loc r
480480
in
481-
Tacred.soft_evaluable_of_global_reference ?loc r
481+
Tacred.evaluable_of_global_reference ?loc r
482482

483483
type ('constr,'ref,'pat) intern_env = {
484484
strict_check : bool;

vernac/classes.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let set_typeclass_transparency ?typeclasses_db ~locality c b =
4040

4141
let set_typeclass_transparency_com ~locality refs b =
4242
let refs = List.map
43-
(fun x -> Tacred.soft_evaluable_of_global_reference
43+
(fun x -> Tacred.evaluable_of_global_reference
4444
(Smartlocate.global_with_alias x))
4545
refs
4646
in

vernac/comHints.ml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ let project_hint ~poly pri l2r r =
6464
let info = {Typeclasses.hint_priority = pri; hint_pattern = None} in
6565
(info, true, GlobRef.ConstRef c)
6666

67-
(* Only error when we have to (axioms may be instantiated if from functors)
68-
XXX maybe error if not from a functor argument?
69-
*)
70-
let soft_evaluable = Tacred.soft_evaluable_of_global_reference
71-
7267
(* Slightly more lenient global hint syntax for backwards compatibility *)
7368
let rectify_hint_constr h = match h with
7469
| Vernacexpr.HintsReference qid -> Some qid
@@ -86,7 +81,7 @@ let interp_hints ~poly h =
8681
Dumpglob.add_glob ?loc:r.CAst.loc gr;
8782
gr
8883
in
89-
let fr r = soft_evaluable ?loc:r.CAst.loc (fref r) in
84+
let fr r = Tacred.evaluable_of_global_reference ?loc:r.CAst.loc (fref r) in
9085
let fi c =
9186
match rectify_hint_constr c with
9287
| Some c ->

0 commit comments

Comments
 (0)