diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2014-09-04 18:39:35 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2014-09-05 00:07:21 +0200 |
commit | 080167469f6435696d785caa1fca9fd258148157 (patch) | |
tree | 4abe474bc00e934c14b52df7c1021ae393373c78 /proofs | |
parent | d55921dbacdc21a640b80482fb32188fa99febe7 (diff) |
At last a working clearbody!
This time it should work at least as well as the previous version. The error
messages were adapted a little. There is still a buggy behaviour when clearing
lets in section, but this is mostly a problem of section handling. The v8.4
version of clearbody did exhibit the same behaviour anyway.
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 8a4531c12..506d04f38 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 357b1f4d7..b4a4a7197 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. *) |