diff options
| author | herbelin | 2004-07-29 15:00:10 +0000 |
|---|---|---|
| committer | herbelin | 2004-07-29 15:00:10 +0000 |
| commit | f3203cfd98806aa034da7673bc226165263ae88a (patch) | |
| tree | 5c305579bf4c1e87aaf9099ba46f50ad26889b8e /lib | |
| parent | f40dd362a85ac6a60b706da9c65e55c70bf2d3a6 (diff) | |
Bug join_loc
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5985 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/util.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util.ml b/lib/util.ml index 1aa3786f2c..476725a91a 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -32,7 +32,9 @@ 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 loc1 loc2 = + if loc1 = dummy_loc or loc2 = dummy_loc then dummy_loc + else (fst loc1, snd loc2) (* Like Exc_located, but specifies the outermost file read, the filename associated to the location of the error, and the error itself. *) |
