aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/leminv.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-09-08 14:56:33 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-09-08 15:41:16 +0200
commit13266ce4c37cb648b5e4e391aa5d7486bbcdb4ee (patch)
treef76fd37023c71c20520e34e4a51c487e7a0388a0 /tactics/leminv.ml
parent79e7a0de25bcb2f10a7f3d1960a8f16eefdbb5a6 (diff)
parentfc579fdc83b751a44a18d2373e86ab38806e7306 (diff)
Merge PR #244.
Diffstat (limited to 'tactics/leminv.ml')
-rw-r--r--tactics/leminv.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/tactics/leminv.ml b/tactics/leminv.ml
index 1639ec54c..d80e86241 100644
--- a/tactics/leminv.ml
+++ b/tactics/leminv.ml
@@ -185,7 +185,7 @@ let inversion_scheme env sigma t sort dep_option inv_op =
let ind =
try find_rectype env sigma i
with Not_found ->
- errorlabstrm "inversion_scheme" (no_inductive_inconstr env sigma i)
+ user_err ~hdr:"inversion_scheme" (no_inductive_inconstr env sigma i)
in
let (invEnv,invGoal) =
compute_first_inversion_scheme env sigma ind sort dep_option
@@ -195,7 +195,7 @@ let inversion_scheme env sigma t sort dep_option inv_op =
(global_vars env invGoal)
(ids_of_named_context (named_context invEnv)));
(*
- errorlabstrm "lemma_inversion"
+ user_err ~hdr:"lemma_inversion"
(str"Computed inversion goal was not closed in initial signature.");
*)
let pf = Proof.start (Evd.from_ctx (evar_universe_context sigma)) [invEnv,invGoal] in
@@ -249,8 +249,8 @@ let add_inversion_lemma_exn na com comsort bool tac =
try
add_inversion_lemma na env sigma c sort bool tac
with
- | UserError ("Case analysis",s) -> (* Reference to Indrec *)
- errorlabstrm "Inv needs Nodep Prop Set" s
+ | UserError (Some "Case analysis",s) -> (* Reference to Indrec *)
+ user_err ~hdr:"Inv needs Nodep Prop Set" s
(* ================================= *)
(* Applying a given inversion lemma *)
@@ -263,10 +263,10 @@ let lemInv id c gls =
Proofview.V82.of_tactic (Clenvtac.res_pf clause ~flags:(Unification.elim_flags ()) ~with_evars:false) gls
with
| NoSuchBinding ->
- errorlabstrm ""
+ user_err
(hov 0 (pr_constr c ++ spc () ++ str "does not refer to an inversion lemma."))
| UserError (a,b) ->
- errorlabstrm "LemInv"
+ user_err ~hdr:"LemInv"
(str "Cannot refine current goal with the lemma " ++
pr_lconstr_env (Refiner.pf_env gls) (Refiner.project gls) c)