aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorherbelin2008-01-05 19:07:05 +0000
committerherbelin2008-01-05 19:07:05 +0000
commitbd9dc4089bdf76437a358d8c1a282f67558905be (patch)
tree56116bcf7d47b7b356a11daaf93af59e8f770cc9 /lib
parentd5d41c634dc1e3e7f07b3a465bc80b4eb5ea856f (diff)
Correction bug #1749 (datant de l'implantation des or-patterns) +
amélioration message d'erreur si nombre de pattern incorrect. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10427 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/util.ml3
-rw-r--r--lib/util.mli2
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml
index 6dd0a792b2..32ede2fb24 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -34,6 +34,9 @@ let anomaly_loc (loc,s,strm) = Stdpp.raise_with_loc loc (Anomaly (s,strm))
let user_err_loc (loc,s,strm) = Stdpp.raise_with_loc loc (UserError (s,strm))
let invalid_arg_loc (loc,s) = Stdpp.raise_with_loc loc (Invalid_argument s)
+let located_fold_left f x (_,a) = f x a
+let located_iter2 f (_,a) (_,b) = f a b
+
(* Like Exc_located, but specifies the outermost file read, the filename
associated to the location of the error, and the error itself. *)
diff --git a/lib/util.mli b/lib/util.mli
index d52db650ac..8e3ec2cb40 100644
--- a/lib/util.mli
+++ b/lib/util.mli
@@ -43,6 +43,8 @@ val anomaly_loc : loc * string * std_ppcmds -> 'a
val user_err_loc : loc * string * std_ppcmds -> 'a
val invalid_arg_loc : loc * string -> 'a
val join_loc : loc -> loc -> loc
+val located_fold_left : ('a -> 'b -> 'a) -> 'a -> 'b located -> 'a
+val located_iter2 : ('a -> 'b -> unit) -> 'a located -> 'b located -> unit
(* Like [Exc_located], but specifies the outermost file read, the
input buffer associated to the location of the error (or the module name