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/bignat.mli | 4 ++-- lib/compat.ml4 | 11 ++++++++--- lib/heap.mli | 2 +- lib/predicate.mli | 2 +- lib/profile.mli | 2 +- lib/rtree.mli | 4 ++-- lib/util.ml | 5 +++-- 7 files changed, 18 insertions(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/bignat.mli b/lib/bignat.mli index f08ccc39..860bcf29 100644 --- a/lib/bignat.mli +++ b/lib/bignat.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: bignat.mli,v 1.4.6.1 2004/07/16 19:30:29 herbelin Exp $ *) +(*i $Id: bignat.mli,v 1.4.6.3 2005/01/21 17:14:11 herbelin Exp $ i*) (*i*) open Pp @@ -26,7 +26,7 @@ val is_one : bignat -> bool val div2_with_rest : bignat -> bignat * bool (* true=odd; false=even *) val add_1 : bignat -> bignat -val sub_1 : bignat -> bignat (* Remark: (sub_1 0)=0 *) +val sub_1 : bignat -> bignat (* Remark: [sub_1 0]=0 *) val mult_2 : bignat -> bignat val less_than : bignat -> bignat -> bool diff --git a/lib/compat.ml4 b/lib/compat.ml4 index 5e1c65b4..0947f5fb 100644 --- a/lib/compat.ml4 +++ b/lib/compat.ml4 @@ -11,19 +11,24 @@ (* IFDEF not available in 3.06; use ifdef instead *) (* type loc is different in 3.08 *) -ifdef OCAML308 then +ifdef OCAML_308 then module M = struct type loc = Token.flocation let dummy_loc = Token.dummy_loc -let unloc (b,e) = (b.Lexing.pos_cnum,e.Lexing.pos_cnum) let make_loc loc = Token.make_loc loc +let unloc (b,e) = + let loc = (b.Lexing.pos_cnum,e.Lexing.pos_cnum) in + (* Ensure that we unpack a char location that was encoded as a line-col + location by make_loc *) + assert (dummy_loc = (b,e) or make_loc loc = (b,e)); + loc end else module M = struct type loc = int * int let dummy_loc = (0,0) -let unloc x = x let make_loc x = x +let unloc x = x end type loc = M.loc diff --git a/lib/heap.mli b/lib/heap.mli index c865461e..46e72728 100644 --- a/lib/heap.mli +++ b/lib/heap.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: heap.mli,v 1.1.2.1 2004/07/16 19:30:30 herbelin Exp $ *) +(*i $Id: heap.mli,v 1.1.2.2 2005/01/21 17:14:11 herbelin Exp $ i*) (* Heaps *) diff --git a/lib/predicate.mli b/lib/predicate.mli index 160fa648..2dc7d85c 100644 --- a/lib/predicate.mli +++ b/lib/predicate.mli @@ -1,5 +1,5 @@ -(* $Id: predicate.mli,v 1.1 2001/09/20 18:10:43 barras Exp $ *) +(*i $Id: predicate.mli,v 1.1.14.1 2005/01/21 17:14:11 herbelin Exp $ i*) (* Module [Pred]: sets over infinite ordered types with complement. *) diff --git a/lib/profile.mli b/lib/profile.mli index e0488de3..e8ce8994 100644 --- a/lib/profile.mli +++ b/lib/profile.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: profile.mli,v 1.7.16.1 2004/07/16 19:30:31 herbelin Exp $ *) +(*i $Id: profile.mli,v 1.7.16.2 2005/01/21 17:14:11 herbelin Exp $ i*) (*s This program is a small time and allocation profiler for Objective Caml *) diff --git a/lib/rtree.mli b/lib/rtree.mli index 0f854bc0..79b57586 100644 --- a/lib/rtree.mli +++ b/lib/rtree.mli @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: rtree.mli,v 1.2.8.1 2004/07/16 19:30:31 herbelin Exp $ i*) +(*i $Id: rtree.mli,v 1.2.8.2 2005/01/21 16:41:52 herbelin Exp $ i*) (* Type of regular tree with nodes labelled by values of type 'a *) type 'a t @@ -20,7 +20,7 @@ val mk_node : 'a -> 'a t array -> 'a t val mk_rec : 'a t array -> 'a t array (* [lift k t] increases of [k] the free parameters of [t]. Needed - to avoid captures when a tree appears under mk_rec *) + to avoid captures when a tree appears under [mk_rec] *) val lift : int -> 'a t -> 'a t val map : ('a -> 'b) -> 'a t -> 'b t 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