From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2U9I1hm004452 for ; Wed, 30 Mar 2011 11:18:06 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEBAFD0kk3RVdg2kGdsb2JhbAClRAgUAQEBAQkJFBQEIaJrilWCIoUhL4hcAQEDBYVlBIU5h02HAYIMOg X-IronPort-AV: E=Sophos;i="4.63,267,1299452400"; d="scan'208";a="104035608" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 30 Mar 2011 11:18:06 +0200 Received: by mail-qw0-f54.google.com with SMTP id 9so1129439qwc.27 for ; Wed, 30 Mar 2011 02:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=X+mMxLpyDMpIOzqpchvQ41ihiiJvUe30iFHarG1HJl0=; b=BQDpVq3B0WoSb2z8t3jrEwe4Pxh6jhaVvZGW6OXL7y20cxX5kRXvJYrLPuTSvXhEKd jiiluymybM2hitf4JxmIxTiU+D06hnxugCvDom1O/IyO+2cWManAQqxKt6nsZHrldino SgOEOnS+FSSfHgE4/eoImC3N6dptKFUAnj9ec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JujMD2OkYpqam73GyWlmR7kz00wqoehvCBRRMrqpkppvMzJQvray1z9tvzOmglmRsU yNr5fTK/8sekA/Y0Z3Pdv01msoPbN0huT11asrUK7T2oxLj/skSG1Saq+MNY3Om6dylR +3hc1sdkcp5zHIfRxGQ7TibVJqCjJaF0MmuLg= MIME-Version: 1.0 Received: by 10.229.136.1 with SMTP id p1mr747722qct.218.1301476686026; Wed, 30 Mar 2011 02:18:06 -0700 (PDT) Received: by 10.229.38.68 with HTTP; Wed, 30 Mar 2011 02:18:05 -0700 (PDT) In-Reply-To: <4D92F0EF.6030105@fugmann.net> References: <4D92F0EF.6030105@fugmann.net> Date: Wed, 30 Mar 2011 13:18:05 +0400 Message-ID: From: Dmitry Bely To: Anders Fugmann Cc: caml-list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2U9I1hm004452 Subject: Re: [Caml-list] first class modules: differences in 3.12 vs 3.13? On Wed, Mar 30, 2011 at 12:59 PM, Anders Fugmann wrote: > Hi Dmitry, > > On 03/30/2011 10:02 AM, Dmitry Bely wrote: >> >> On Wed, Mar 30, 2011 at 11:57 AM, Joel Reymont  wrote: >>> >>> I get an error on this with 3.12 but no error with 3.13.0+dev2 >>> (2010-10-22). >>> >>> let _ = Simple.main (module Client) (module Server) (module Config) >>> >>> Why? I thought 3.12 supported first-class modules. >> >> I believe module types are a must: >> >> let _ = Simple.main (module Client : CLIENT) (module Server : SERVER) >> (module Config : CONFIG) > > I tried this using 3.12, and the compiler now complains that: > Error: Unbound module type CLIENT > > (I'm using the same code base as Joel Reymont) > > If the names in capital letters just arbitrary names? Of course, you should define it first: module type CLIENT = sig ... end In your case module type CLIENT = sig include module type of Client end will probably be sufficient. For more information on module types see chapter 6.10 of the OCaml user's manual. - Dmitry Bely