From 1653654a0eba7ecca78e67b4db1f6fa031e7271f Mon Sep 17 00:00:00 2001 From: ppedrot Date: Sun, 25 Nov 2012 17:38:55 +0000 Subject: More equality functions git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15998 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/loc.ml | 2 ++ lib/loc.mli | 3 +++ 2 files changed, 5 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3