From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA24963 for caml-redistribution; Sat, 18 Dec 1999 18:25:15 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA10641 for ; Sat, 18 Dec 1999 08:01:04 +0100 (MET) Received: from ruby (kenny120.zip.com.au [61.8.18.248]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id IAA26348 for ; Sat, 18 Dec 1999 08:00:57 +0100 (MET) Received: from maxtal.com.au (IDENT:root@localhost [127.0.0.1]) by ruby (8.9.3/8.9.3) with ESMTP id SAA21233 for ; Sat, 18 Dec 1999 18:02:35 +1100 Sender: weis Message-ID: <385B318A.76681803@maxtal.com.au> Date: Sat, 18 Dec 1999 18:02:34 +1100 From: skaller Organization: Maxtal X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.12 i586) X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: How do I .. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm confused: Objective Caml version 2.99 (99/12/08) # let f (lx:x : int) = x + 1;; Syntax error Here, I have an argument x, a label lx, and a type declaration int. What's the error? Can't I both label an argument, and also type it? The whitespace rule is a bit weird .. but it makes some sense, when compared with 'a for a type variable: the ' must come right in front of the a, with no white space, so I guess I can live with lablx:x as a labelled argument .. :-) At first, I got really confused by the difference between a label, and the name of the argument. Until I realised, you can't use the name of the argument as a label, because it would imply all arguments were labelled. In the tutorial, it would be nice to replace ambiguous examples like: let f x:x ... where I can't tell which x is which, with let f xlabl:xparam .. where the names clearly suggest what is what. -- John Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia homepage: http://www.maxtal.com.au/~skaller voice: 61-2-9660-0850