diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-01-28 21:05:35 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-01-28 21:05:35 +0000 |
commit | 5a39e6c08d428d774165e0ef3922ba8b75eee9e1 (patch) | |
tree | e035f490e2c748356df73342876b22cfcb3bc5a0 /pretyping/program.ml | |
parent | 5e8824960f68f529869ac299b030282cc916ba2c (diff) |
Uniformization of the "anomaly" command.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16165 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping/program.ml')
-rw-r--r-- | pretyping/program.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pretyping/program.ml b/pretyping/program.ml index d2e22f71e..43175e80c 100644 --- a/pretyping/program.ml +++ b/pretyping/program.ml @@ -6,6 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) +open Pp open Errors open Util open Names @@ -16,7 +17,8 @@ let make_dir l = Dir_path.make (List.map Id.of_string (List.rev l)) let find_reference locstr dir s = let sp = Libnames.make_path (make_dir dir) (Id.of_string s) in try Nametab.global_of_path sp - with Not_found -> anomaly (locstr^": cannot find "^(Libnames.string_of_path sp)) + with Not_found -> + anomaly ~label:locstr (Pp.str "cannot find" ++ spc () ++ Libnames.pr_path sp) let coq_reference locstr dir s = find_reference locstr ("Coq"::dir) s let coq_constant locstr dir s = Globnames.constr_of_global (coq_reference locstr dir s) |