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 SAA12582; Wed, 31 Oct 2001 18:10:38 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA12739 for caml-list@pauillac.inria.fr; Wed, 31 Oct 2001 18:10:36 +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 BAA31719 for ; Wed, 31 Oct 2001 01:05:44 +0100 (MET) Received: from hugo.int-evry.fr (hugo.int-evry.fr [157.159.100.81]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f9V05hf02826 for ; Wed, 31 Oct 2001 01:05:43 +0100 (MET) Received: from (rinderkn@localhost) by hugo.int-evry.fr (8.8.8/jtpda-5.3) id BAA26315 ; Wed, 31 Oct 2001 01:05:34 +0100 (MET) Date: Wed, 31 Oct 2001 01:05:34 +0100 From: Christian RINDERKNECHT To: caml-list@inria.fr Cc: rinderkn@icu.ac.kr Subject: [Caml-list] Optional arguments and type annotations Message-ID: <20011031010534.A26259@hugo.int-evry.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello List, First, let me say I am quite new to labels (I was waiting for the 3.03 release for using them). I am used to annotate the top-level functions with their types, and I was surprised to see that I must write the following to make it type-check: #let bump ?(step:int option) (x:int) = match step with None -> x * 2 | Some y -> x + y ;; #val bump : ?step:int -> int -> int = and then there is a discrepancy between the "int option" annotation in the .ml and the "int" in the interface. This is not a big deal to solve:), but it looks strange to me. Best regards, -- Christian ------------------------------------------------------------------------ Christian Rinderknecht Phone +82 42 866 6147 Network Architecture Laboratory Fax +82 42 866 6154 Information and Communications University WWW http://nalab.icu.ac.kr 58-4 Hwaam-dong, Yuseong-gu, Daejeon, e-mail rinderkn@icu.ac.kr 305-732, Korea ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr