caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dmitry Bely <dmitry.bely@gmail.com>
To: Anders Fugmann <anders@fugmann.net>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] first class modules: differences in 3.12 vs 3.13?
Date: Wed, 30 Mar 2011 13:18:05 +0400	[thread overview]
Message-ID: <AANLkTi=vkO4PoG3S8PbydLzfZOpX4XZJ=zU+HRijG9W8@mail.gmail.com> (raw)
In-Reply-To: <4D92F0EF.6030105@fugmann.net>

On Wed, Mar 30, 2011 at 12:59 PM, Anders Fugmann <anders@fugmann.net> wrote:
> Hi Dmitry,
>
> On 03/30/2011 10:02 AM, Dmitry Bely wrote:
>>
>> On Wed, Mar 30, 2011 at 11:57 AM, Joel Reymont<joelr1@gmail.com>  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


      reply	other threads:[~2011-03-30  9:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  7:57 Joel Reymont
2011-03-30  8:02 ` Dmitry Bely
2011-03-30  8:27   ` Maxence Guesdon
2011-03-30  8:59   ` Anders Fugmann
2011-03-30  9:18     ` Dmitry Bely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=vkO4PoG3S8PbydLzfZOpX4XZJ=zU+HRijG9W8@mail.gmail.com' \
    --to=dmitry.bely@gmail.com \
    --cc=anders@fugmann.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).