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 LAA04658; Mon, 29 Mar 2004 11:52:10 +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 LAA07349 for ; Mon, 29 Mar 2004 11:52:08 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mwinf0602.wanadoo.fr (smtp6.wanadoo.fr [193.252.22.25]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i2T9q8Hd002382 for ; Mon, 29 Mar 2004 11:52:08 +0200 Received: from vanicat.homelinux.org (ca-bordeaux-17-156.w80-8.abo.wanadoo.fr [80.8.89.156]) by mwinf0602.wanadoo.fr (SMTP Server) with ESMTP id 3416754001D8 for ; Mon, 29 Mar 2004 11:52:00 +0200 (CEST) Received: from moi by vanicat.homelinux.org with local (Exim 4.30) id 1B7tQd-0003Ay-Nl for caml-list@inria.fr; Mon, 29 Mar 2004 11:51:35 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] [Q] explicit typing again References: <16487.60787.223815.927390@gargle.gargle.HOWL> From: Remi Vanicat Mail-Copy-To: never Date: Mon, 29 Mar 2004 11:51:35 +0200 In-Reply-To: <16487.60787.223815.927390@gargle.gargle.HOWL> (fis@wiwi.hu-berlin.de's message of "Mon, 29 Mar 2004 11:33:39 +0200") Message-ID: <873c7st1zs.dlv@vanicat.homelinux.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 annotate:01 int:01 int:01 writes:01 remi:01 remi:01 vanicat:01 vanicat:01 parser:02 explicit:03 explicit:03 typing:03 typing:03 anybody:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 407 fis@wiwi.hu-berlin.de writes: > hi, > > sorry, but i am really enthusiastic about explicit typing. i will > probably start to annotate expressions like "3" soon... (-: > > could anybody tell me how i get this one straight? > > # let (a: int, b) = (1, 3) in a;; it is : let ((a:int),b) = (1, 3) in a;; > # let (a, b) : int * int = (1, 3) in a;; there it is : let ((a, b) : int * int) = (1, 3) in a;; In fact, often it is enough to add some parenthesis around the "value : type" to make the parser happy. -- Rémi Vanicat ------------------- 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