diff options
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/proofview.ml | 9 | ||||
| -rw-r--r-- | proofs/proofview.mli | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml index 8a4531c12b..506d04f38a 100644 --- a/proofs/proofview.ml +++ b/proofs/proofview.ml @@ -930,6 +930,15 @@ struct let h = (evd, evk :: evs) in (h, ev) + let new_evar_instance (evd, evs) ctx typ inst = + let src = (Loc.ghost, Evar_kinds.GoalEvar) in + let (evd, ev) = Evarutil.new_evar_instance ctx evd ~src typ inst in + let evd = Typeclasses.mark_unresolvables + ~filter:(fun ev' _ -> Evar.equal (fst (Term.destEvar ev)) ev') evd in + let (evk, _) = Term.destEvar ev in + let h = (evd, evk :: evs) in + (h, ev) + let fresh_constructor_instance (evd,evs) env construct = let (evd,pconstruct) = Evd.fresh_constructor_instance env evd construct in (evd,evs) , pconstruct diff --git a/proofs/proofview.mli b/proofs/proofview.mli index 357b1f4d7d..b4a4a71970 100644 --- a/proofs/proofview.mli +++ b/proofs/proofview.mli @@ -427,6 +427,10 @@ module Refine : sig val new_evar : handle -> Environ.env -> Constr.types -> handle * Constr.t (** Create a new hole that will be added to the goals to solve. *) + val new_evar_instance : handle -> Environ.named_context_val -> + Constr.types -> Constr.t list -> handle * Constr.t + (** Create a new hole with the given signature and instance. *) + val fresh_constructor_instance : handle -> Environ.env -> Names.constructor -> handle * Constr.pconstructor (** Creates a constructor with fresh universe variables. *) |
