diff options
author | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2005-01-31 14:34:14 +0000 |
---|---|---|
committer | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2005-01-31 14:34:14 +0000 |
commit | 6497f27021fec4e01f2182014f2bb1989b4707f9 (patch) | |
tree | 473be7e63895a42966970ab6a70998113bc1bd59 /lib/util.ml | |
parent | 6b649aba925b6f7462da07599fe67ebb12a3460e (diff) |
Imported Upstream version 8.0pl2upstream/8.0pl2
Diffstat (limited to 'lib/util.ml')
-rw-r--r-- | lib/util.ml | 5 |
1 files changed, 3 insertions, 2 deletions
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. *) |