diff options
author | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-06-22 15:14:30 +0000 |
---|---|---|
committer | ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-06-22 15:14:30 +0000 |
commit | 6b45f2d36929162cf92272bb60c2c245d9a0ead3 (patch) | |
tree | 93aa975697b7de73563c84773d99b4c65b92173b /checker/checker.ml | |
parent | fea214f82954197d23fda9a0e4e7d93e0cbf9b4c (diff) |
Added an indirection with respect to Loc in Compat. As many [open Compat]
were closed (i.e. the only remaining ones are those of printing/parsing).
Meanwhile, a simplified interface is provided in loc.mli.
This also permits to put Pp in Clib, because it does not depend on
CAMLP4/5 anymore.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15475 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'checker/checker.ml')
-rw-r--r-- | checker/checker.ml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/checker/checker.ml b/checker/checker.ml index 53c059eb3..15c27ffa5 100644 --- a/checker/checker.ml +++ b/checker/checker.ml @@ -6,7 +6,6 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -open Compat open Pp open Errors open Util @@ -215,10 +214,10 @@ let anomaly_string () = str "Anomaly: " let report () = (str "." ++ spc () ++ str "Please report.") let print_loc loc = - if loc = dummy_loc then + if loc = Loc.ghost then (str"<unknown>") else - let loc = unloc loc in + let loc = Loc.unloc loc in (int (fst loc) ++ str"-" ++ int (snd loc)) let guill s = "\""^s^"\"" @@ -274,7 +273,7 @@ let rec explain_exn = function hov 0 (str "Error:" ++ spc () ++ Himsg.explain_inductive_error ctx e)*) | Loc.Exc_located (loc,exc) -> - hov 0 ((if loc = dummy_loc then (mt ()) + hov 0 ((if loc = Loc.ghost then (mt ()) else (str"At location " ++ print_loc loc ++ str":" ++ fnl ())) ++ explain_exn exc) | Assert_failure (s,b,e) -> |