From 6497f27021fec4e01f2182014f2bb1989b4707f9 Mon Sep 17 00:00:00 2001 From: Samuel Mimram Date: Mon, 31 Jan 2005 14:34:14 +0000 Subject: Imported Upstream version 8.0pl2 --- lib/util.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/util.ml') diff --git a/lib/util.ml b/lib/util.ml index 37568f9b..b5470e58 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: util.ml,v 1.84.2.2 2004/07/16 20:43:46 herbelin Exp $ *) +(* $Id: util.ml,v 1.84.2.3 2004/07/29 15:00:04 herbelin Exp $ *) open Pp @@ -32,7 +32,8 @@ type 'a located = loc * 'a 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 join_loc (deb1,_) (_,fin2) = (deb1,fin2) +let join_loc (deb1,_ as loc1) (_,fin2 as loc2) = + if loc1 = dummy_loc or loc2 = dummy_loc then dummy_loc else (deb1,fin2) (* Like Exc_located, but specifies the outermost file read, the filename associated to the location of the error, and the error itself. *) -- cgit v1.2.3