From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2PJAK5C032639 for ; Fri, 25 Mar 2011 20:10:21 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgMDAHznjE3RVdQ2kGdsb2JhbACYMI0pCBUBAQEJCQ0HFAQhiE2gNopUgiGFJS+IXAEBAwWFZASMdYNUc4RCOg X-IronPort-AV: E=Sophos;i="4.63,244,1299452400"; d="scan'208";a="91150859" Received: from mail-vw0-f54.google.com ([209.85.212.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Mar 2011 20:10:13 +0100 Received: by vws18 with SMTP id 18so1893292vws.27 for ; Fri, 25 Mar 2011 12:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; bh=6hoGh6KVEcE4ZF5/PDgPc2HlR8d3XSE73+uYhV3Knec=; b=epQMAyVZSEkg0eikwkV+pOYeWoWnv9c6ulB9pc2m7kDSD9UA5s6A+VOgJbaOBu45Rz wJySuRGYOl/yp6DpSnfjazCFAG6M9l2cPVnUnl87z4MkXXGYJJgDhw+FfbF/bPY4kUvV 2tszOhl3IcJm9tzjjCo6NEcgOPHaLye2JAcys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=FDqil7Q5UFVsm/Uskbma1o74sWZooHZrfqvtpQe3eDNjQMLnkr/bAg58C8HKh09ET9 t4f3dCFj4Eq4yN2TXbjPDnmjrzVr97VYHM7K4w3w6HHpjesgoqqlYCfy5GFYRGUYNrAG ZPoQD+iUdw30AMTn/jnDHmBNXQOpYKEIGX90I= Received: by 10.52.92.172 with SMTP id cn12mr1573625vdb.294.1301080211957; Fri, 25 Mar 2011 12:10:11 -0700 (PDT) Received: from [192.168.10.124] (modemcable220.198-200-24.mc.videotron.ca [24.200.198.220]) by mx.google.com with ESMTPS id j15sm280827vcs.44.2011.03.25.12.10.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Mar 2011 12:10:09 -0700 (PDT) Cc: caml-list Message-Id: <3CD018B0-B00B-4CB0-AAA3-0F8C19EB2E8D@gmail.com> From: Vincent Aravantinos To: Joel Reymont In-Reply-To: <083A0142-982A-42DA-84EB-E3F5D26577E1@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v936) Date: Fri, 25 Mar 2011 15:10:07 -0400 References: <083A0142-982A-42DA-84EB-E3F5D26577E1@gmail.com> X-Mailer: Apple Mail (2.936) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2PJAK5C032639 Subject: Re: [Caml-list] shortcut to omit the functor keyword It seems to me as similar to the fact that you can write: type t = int -> int but not: type t int = int even though you can write: let f = fun x -> x + 1 or: let f x = x + 1 You're defining the type of a function, not a function over types. Or, for modules: You're defining the module type of a functor, not a functor over module types (not sure I could even call this a functor). Le 25 mars 11 à 14:43, Joel Reymont a écrit : > Why does the shortcut to omit the functor keyword only exists in > module definitions but not in signatures? > > For example, why do > > module type A = sig end;; > module type B = sig end;; > > module type C = functor (X : A) -> functor (Y : B) -> sig end;; > > and not > > module type C (X : A) (Y : B) = sig end;; > > the latter would be consistent with > > module C (X : A) (Y : B) = struct end;; > > -------------------------------------------------------------------------- > - for hire: mac osx device driver ninja, kernel extensions and usb > drivers > ---------------------+------------ > +--------------------------------------- > http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont > ---------------------+------------ > +--------------------------------------- > > > > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >