aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorppedrot2012-11-25 17:38:55 +0000
committerppedrot2012-11-25 17:38:55 +0000
commit1653654a0eba7ecca78e67b4db1f6fa031e7271f (patch)
treee5a914ecf08ebddc774216122d3910fb8ecee9b9 /lib
parent589b1edc7064c2d210cf4786a6e5ed32d8165117 (diff)
More equality functions
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15998 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/loc.ml2
-rw-r--r--lib/loc.mli3
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/loc.ml b/lib/loc.ml
index 57c928bbcb..e87ad132e6 100644
--- a/lib/loc.ml
+++ b/lib/loc.ml
@@ -33,6 +33,8 @@ let ghost = {
fname = ""; line_nb = -1; bol_pos = 0; line_nb_last = -1; bol_pos_last = 0;
bp = 0; ep = 0; }
+let is_ghost loc = Pervasives.(=) loc ghost (** FIXME *)
+
let merge loc1 loc2 =
if loc1.bp < loc2.bp then
if loc1.ep < loc2.ep then {
diff --git a/lib/loc.mli b/lib/loc.mli
index 0b6ba544d1..c712cddd9e 100644
--- a/lib/loc.mli
+++ b/lib/loc.mli
@@ -32,6 +32,9 @@ val make_loc : int * int -> t
val ghost : t
(** Dummy location *)
+val is_ghost : t -> bool
+(** Test whether the location is meaningful *)
+
val merge : t -> t -> t
val raise : t -> exn -> 'a