diff options
| author | Emilio Jesus Gallego Arias | 2016-07-07 04:56:24 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2016-08-19 01:48:30 +0200 |
| commit | de038270f72214b169d056642eb7144a79e6f126 (patch) | |
| tree | c1a5dc835f5042c79418fdbadc7b266a473b8c82 /proofs | |
| parent | 13fb26d615cdb03a4c4841c20b108deab2de60b3 (diff) | |
Unify location handling of error functions.
In some cases prior to this patch, there were two cases for the same
error function, one taking a location, the other not.
We unify them by using an option parameter, in the line with recent
changes in warnings and feedback.
This implies a bit of clean up in some places, but more importantly, is
the preparation for subsequent patches making `Loc.location` opaque,
change that could be use to improve modularity and allow a more
functional implementation strategy --- for example --- of the
beautifier.
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/evar_refiner.ml | 4 | ||||
| -rw-r--r-- | proofs/proof_global.ml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/proofs/evar_refiner.ml b/proofs/evar_refiner.ml index 5f0cc73d2c..ce216e563f 100644 --- a/proofs/evar_refiner.ml +++ b/proofs/evar_refiner.ml @@ -54,8 +54,8 @@ let w_refine (evk,evi) (ltac_var,rawc) sigma = env sigma ltac_var (Pretyping.OfType evi.evar_concl) rawc with e when CErrors.noncritical e -> let loc = Glob_ops.loc_of_glob_constr rawc in - user_err_loc - (loc,"", str "Instance is not well-typed in the environment of " ++ + user_err ~loc "" + (str "Instance is not well-typed in the environment of " ++ pr_existential_key sigma evk ++ str ".") in define_and_solve_constraints evk typed_c env (evars_reset_evd sigma' sigma) diff --git a/proofs/proof_global.ml b/proofs/proof_global.ml index 7605f63872..7b43b64ef2 100644 --- a/proofs/proof_global.ml +++ b/proofs/proof_global.ml @@ -202,8 +202,8 @@ let discard (loc,id) = let n = List.length !pstates in discard_gen id; if Int.equal (List.length !pstates) n then - CErrors.user_err_loc - (loc,"Pfedit.delete_proof",str"No such proof" ++ msg_proofs ()) + CErrors.user_err ~loc + "Pfedit.delete_proof" (str"No such proof" ++ msg_proofs ()) let discard_current () = if List.is_empty !pstates then raise NoCurrentProof else pstates := List.tl !pstates |
