From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id DBAF3BC57 for ; Wed, 15 Dec 2010 17:53:07 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AosAAP+ACE1KfVK0k2dsb2JhbACDZJIajiUIFQEBAQEJCQoJEQQgqHuJNDwKgg6FMy6IVwEBAwWBHIM1dASFH4Vcg2AehE8 X-IronPort-AV: E=Sophos;i="4.59,349,1288566000"; d="scan'208";a="83990253" Received: from mail-wy0-f180.google.com ([74.125.82.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 15 Dec 2010 17:53:07 +0100 Received: by wyb28 with SMTP id 28so1749747wyb.39 for ; Wed, 15 Dec 2010 08:53:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=oZowy17JSBcKdkaW8JM0/0czhJgU46E91+p+MOFYObE=; b=gR5WB8VnVV09fCRQu0OSVji1ad5zgTpSGzZO+U5SYI4aptJ+FrmPw8UBv6e1e7H5gi XN4E3HaePRPsaAUtQZssojMn8C/c8W+2xOYAjXx8xFXbH/+gt5IjaVV/72sU/Ob6DJG0 TPlGdoN16YoICs2EWwiTiMmwWqOsx/n5Nbc30= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=lwFNs/h/fysqGoPyDJrz6tZCjwbjw4k55z/DxJcL9ltkUg8YN24jlRabH2eErHG0ag LazsE3lS8M9QWvuzKtn7obUsYmhS2ELh4E4vW5m4HoJxCcH3TIb96c2ZA4E0uoxnCud5 2cvxYKDC2qmYE69x+ytaVtPoNBsK5yrDYk8J4= Received: by 10.227.141.131 with SMTP id m3mr1984232wbu.125.1292431985841; Wed, 15 Dec 2010 08:53:05 -0800 (PST) Received: from cloudy.localnet ([85.69.98.254]) by mx.google.com with ESMTPS id f35sm4759181wbf.8.2010.12.15.08.53.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Dec 2010 08:53:05 -0800 (PST) From: Raphael Proust Reply-To: raphlalou@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Doubt about function delaration parameter Date: Wed, 15 Dec 2010 17:56:48 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.32-5-amd64; KDE/4.4.5; x86_64; ; ) Cc: sieira References: <30464033.post@talk.nabble.com> <30465308.post@talk.nabble.com> In-Reply-To: <30465308.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201012151756.48546.raphlalou@gmail.com> X-Spam: no; 0.00; syntax:01 node:01 haskell:01 cembre:98 23,:98 ubuntu:98 caml-list:01 caml:02 parameter:02 string:02 string:02 parenthesis:02 suggestion:03 seems:03 shorter:04 Le mercredi 15 d=C3=A9cembre 2010 17:15:23, sieira a =C3=A9crit : > Thanks for your replies. I'm now having some issue with Raphael's > suggestion of using (string * string) list;; as the menu type. >=20 >=20 > type menu =3D (string*string) list;; >=20 > Results in a syntax error at the first parenthesis, while >=20 > type menu =3D string*string;; >=20 > fails too (at the asterisk) >=20 > It seems like I'm missing something. Since according to the > http://caml.inria.fr/pub/docs/manual-caml-light/node3.5.html documentanti= on > , this sintax should be right. >=20 > I'm using Camllight 0.81 by Fran=C3=A7ois Boisson running in Ubuntu lucid= lynx I just installed Camllight and I encountered the problem as you. Because th= e=20 type menu is just a shorter name for the complete type (string * string) li= st,=20 you have to use: type menu =3D=3D ( string * string ) list ;; (with two '=3D' signs) I don't know the exact rule about this. It might be close to the difference= =20 between 'type' and 'data' in Haskell. Good luck! =2D-=20 _______ Rapha=C3=ABl