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 FAA26802; Tue, 30 Sep 2003 05:07:35 +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 FAA22860 for ; Tue, 30 Sep 2003 05:07:33 +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 h8U37VH26133 for ; Tue, 30 Sep 2003 05:07:32 +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 MAA10619; Tue, 30 Sep 2003 12:07:27 +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: <20030930102430J.garrigue@kurims.kyoto-u.ac.jp> References: <3F78763D.000003.03248@lanfeust> <20030930102430J.garrigue@kurims.kyoto-u.ac.jp> 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: <20030930120727Z.garrigue@kurims.kyoto-u.ac.jp> Date: Tue, 30 Sep 2003 12:07:27 +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 bug:01 bug:01 camlp:01 camlp:01 parentheses:01 jacques: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. After another bug report, it seems that a parsing bug went into camlp4 just before the release :-( Camlp4 Parsing version 3.07 # fun (f : ?x:int -> bool -> float) -> f true;; This expression has type bool but is here used with type ?x:int -> bool # fun (f : ?x:int -> bool -> float) -> f;; - : ((?x:int -> bool) -> float) -> (?x:int -> bool) -> float = This is apparently a priority problem. A workaround is to explicitly add parentheses. # fun (f : ?x:int -> (bool -> float)) -> f true;; - : (?x:int -> bool -> float) -> float = There is no fix for camlp4 itself yet. 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