From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id DAA25383; Tue, 30 Sep 2003 03:24:43 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 DAA23392 for ; Tue, 30 Sep 2003 03:24:41 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8U1OdH19829 for ; Tue, 30 Sep 2003 03:24:40 +0200 (MET DST) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2-20030924/3.7W) with ESMTP id KAA08880; Tue, 30 Sep 2003 10:24:31 +0900 (JST) To: Vincent.Barichard@info.univ-angers.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] ocaml 3.07 and optional arguments In-Reply-To: <3F78763D.000003.03248@lanfeust> References: <3F78763D.000003.03248@lanfeust> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20030930102430J.garrigue@kurims.kyoto-u.ac.jp> Date: Tue, 30 Sep 2003 10:24:30 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 3.07:01 jacques:01 barichard:01 barichard:01 univ-angers:01 3.07:01 compil:01 compil:01 infer:01 bug:01 hypothesis:01 3.06,:01 ocamlc:01 -principal:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: "Vincent Barichard" > I've just downloaded ocaml 3.07 and compil it. But when I try to compil old > programs, I encounter some problems with optional arguments in methods. [...] > Is there any changes with the use of optional arguments for methods ? I don't remember introducing any change at that level. Your exemple is not detailed enough that I can infer the real cause. You should submit a bug report including a minimal set of sources producing the error. A reasonable hypothesis is that you have fallen into the non-principality of optional arguments (which is explained in the manual). Try compiling your sources with ocaml 3.06, adding the option ocamlc -principal. If it tells you that some use is not principal, then the cause is the increased polymorphism in 3.07: some type sharing appearing in 3.06 does not appear in 3.07. In general more polymorphism is a good thing, but with non-principal features it may introduce incompatibilities. Here, this would mean that you need another type annotation elsewhere. Byt the way, why do you write (sol#scalarizingFunction : ?weightVector':Solution.cWeightVector -> Solution cPoint -> float) rather than "(sol : #Solution.solution)#scalarizingFunction" ? Jacques Garrigue ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners