From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA06763 for caml-redistribution; Wed, 19 Nov 1997 10:25:27 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA27631 for ; Tue, 18 Nov 1997 23:47:16 +0100 (MET) Received: from simon.cs.cornell.edu (SIMON.CS.CORNELL.EDU [128.84.154.10]) by concorde.inria.fr (8.8.7/8.8.5) with ESMTP id XAA26348 for ; Tue, 18 Nov 1997 23:47:15 +0100 (MET) Received: from cloyd.cs.cornell.edu (CLOYD.CS.CORNELL.EDU [128.84.227.15]) by simon.cs.cornell.edu (8.8.5/8.8.5/R-1.8) with ESMTP id NAA02261 for ; Tue, 18 Nov 1997 13:57:35 -0500 (EST) Received: from mario.cs.cornell.edu (MARIO.CS.CORNELL.EDU [128.84.254.142]) by cloyd.cs.cornell.edu (8.8.5/8.8.5/M-1.9) with ESMTP id NAA17613 for ; Tue, 18 Nov 1997 13:57:33 -0500 (EST) Received: (from stodghil@localhost) by mario.cs.cornell.edu (8.8.5/8.8.5/C-1.2) id NAA13615; Tue, 18 Nov 1997 13:57:32 -0500 (EST) To: caml-list@pauillac.inria.fr Subject: Type-checking bug (or feature?) in O'Caml 1.06 Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit From: Paul Stodghill Date: 18 Nov 1997 13:57:31 -0500 Message-ID: X-Mailer: Gnus v5.5/XEmacs 19.15 Sender: weis [ Pardon, mais non français. ] Something changed in the way that type checking is done between 1.05 and 1.06. Bug or feature? % ~pidgin/sww/sparc-solaris/bin/ocamlc -v The Objective Caml compiler, version 1.05 Standard library directory: /usr/u/pidgin/sww/sun4-solaris/lib/ocaml % ~pidgin/sww/sparc-solaris/bin/ocamlc -c caml_map.mli % ~pidgin/sww/sparc-solaris/bin/ocamlc -c caml_map.ml % ~/usr/sparc-solaris/bin/ocamlc -v The Objective Caml compiler, version 1.06 Standard library directory: /home/stodghil/usr/sparc-solaris/lib/ocaml % ~/usr/sparc-solaris/bin/ocamlc -c caml_map.mli % ~/usr/sparc-solaris/bin/ocamlc -c caml_map.ml The implementation caml_map.ml does not match the interface caml_map.cmi: Values do not match: val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit is not included in val iter : ('a -> 'b -> 'c) -> ('a, 'b) t -> unit Below are the relevant parts of the code that is causing the problem. This code is taken directly from the compatibility library generated by caml2cslV2.0. >>From caml_map.mli: --------------------------------------------------------------------------- val iter: ('a -> 'b -> 'c) -> ('a, 'b) t -> unit --------------------------------------------------------------------------- >>From caml_map.ml: --------------------------------------------------------------------------- let iter f m = let rec iter = function Empty -> () | Node(l, b, r, _) -> iter l; f b.key b.data; List.iter (f b.key) b.prev; iter r in iter m.tree;; --------------------------------------------------------------------------- -- Paul Stodghill http://www.cs.cornell.edu/home/stodghil/home.html