aboutsummaryrefslogtreecommitdiff
path: root/checker
diff options
context:
space:
mode:
authorppedrot2012-06-22 15:14:30 +0000
committerppedrot2012-06-22 15:14:30 +0000
commit6b45f2d36929162cf92272bb60c2c245d9a0ead3 (patch)
tree93aa975697b7de73563c84773d99b4c65b92173b /checker
parentfea214f82954197d23fda9a0e4e7d93e0cbf9b4c (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')
-rw-r--r--checker/check.mllib1
-rw-r--r--checker/checker.ml7
-rw-r--r--checker/modops.ml2
3 files changed, 5 insertions, 5 deletions
diff --git a/checker/check.mllib b/checker/check.mllib
index 2cd86355fc..15d7df1d3d 100644
--- a/checker/check.mllib
+++ b/checker/check.mllib
@@ -3,6 +3,7 @@ Pp_control
Compat
Flags
Pp
+Loc
Segmenttree
Unicodetable
Errors
diff --git a/checker/checker.ml b/checker/checker.ml
index 53c059eb36..15c27ffa5d 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) ->
diff --git a/checker/modops.ml b/checker/modops.ml
index 4212a93615..1a7d57e1ce 100644
--- a/checker/modops.ml
+++ b/checker/modops.ml
@@ -37,7 +37,7 @@ let error_no_such_label_sub l l1 =
let error_not_a_module_loc loc s =
user_err_loc (loc,"",str ("\""^string_of_label s^"\" is not a module"))
-let error_not_a_module s = error_not_a_module_loc dummy_loc s
+let error_not_a_module s = error_not_a_module_loc Loc.ghost s
let error_with_incorrect l =
error ("Incorrect constraint for label \""^(string_of_label l)^"\"")