Skip to content

Commit

Permalink
Adapt to coq/coq#18327 (projection opacity) (impermeable#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlepigre authored Jan 24, 2024
1 parent 865d59e commit 3ee230f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/wp_auto.ml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ let exact (h: hint): unit tactic =
(**
Same function as {! Auto.exists_evaluable_reference}
*)
let exists_evaluable_reference (env: Environ.env) (evaluable_ref: Tacred.evaluable_global_reference): bool = match evaluable_ref with
| Tacred.EvalConstRef _ -> true
| Tacred.EvalVarRef v -> try ignore(Environ.lookup_named v env); true with Not_found -> false
let exists_evaluable_reference (env: Environ.env) (evaluable_ref: Names.Evaluable.t): bool = match evaluable_ref with
| Evaluable.EvalConstRef _ -> true
| Evaluable.EvalProjectionRef _ -> true
| Evaluable.EvalVarRef v -> try ignore(Environ.lookup_named v env); true with Not_found -> false

(* All the definitions below are inspired by the coq-core hidden library (i.e not visible in the API) but modified for Waterproof *)

Expand Down Expand Up @@ -313,4 +314,4 @@ let wp_auto (log: bool) (n: int) (lems: Tactypes.delayed_open_constr list) (dbna
This function acts the same as {! wp_auto} but will fail if all proof found contain at least one must-use lemma that is unused or one hint that is in the [forbidden] list.
*)
let rwp_auto (log: bool) (n: int) (lems: Tactypes.delayed_open_constr list) (dbnames: hint_db_name list) (must_use_tactics: Pp.t list) (forbidden_tactics: Pp.t list): trace tactic =
gen_wp_auto log ~n lems (Some dbnames) must_use_tactics forbidden_tactics
gen_wp_auto log ~n lems (Some dbnames) must_use_tactics forbidden_tactics
4 changes: 2 additions & 2 deletions src/wp_auto.mli
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ open Backtracking
(**
Same function as {! Auto.exists_evaluable_reference}
*)
val exists_evaluable_reference : Environ.env -> Tacred.evaluable_global_reference -> bool
val exists_evaluable_reference : Environ.env -> Names.Evaluable.t -> bool

(**
Prints "idtac" if the [log] field is [true]
Expand Down Expand Up @@ -87,4 +87,4 @@ val rwp_auto :
string list ->
Pp.t list ->
Pp.t list ->
Backtracking.trace Proofview.tactic
Backtracking.trace Proofview.tactic

0 comments on commit 3ee230f

Please sign in to comment.