From: Fabrice Marchant <fabricemarchant@free.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Problem with module inclusion
Date: Thu, 5 Jun 2008 20:10:10 +0200 [thread overview]
Message-ID: <20080605201010.72782a9f@free.fr> (raw)
In-Reply-To: <48479769.80609@lri.fr>
On Thu, 05 Jun 2008 09:36:09 +0200
Jean-Christophe Filliâtre <Jean-Christophe.Filliatre@lri.fr> wrote:
> You need
>
> - either to export to_list in signature of XMap above as
>
> val to_list : 'a t -> (X.t * 'a) list
>
> and then you'll be able to write StringCounters.XMap.to_list in your
> example
>
> - or to re-export it in module Counters, as
>
> let to_list = XMap.to_list
>
> and to declare it in signature of module Counters, as
>
> val to_list : t -> (X.t * int) list
>
> and then to use it as StringCounters.to_list in your example.
>
> Hope this helps,
It perfectly does ! Thanks a lot.
Among the 2 ways you explained, I prefer the former because we haven't to worry over what is the enclosing module. But maybe specifying 'int' type in the later would cause a speeder code ?
Regards,
Fabrice
http://fabrice.marchant.free.fr/siteOCaml/OCaml.html
prev parent reply other threads:[~2008-06-05 20:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 12:19 Fabrice Marchant
2008-06-05 7:36 ` [Caml-list] " Jean-Christophe Filliâtre
2008-06-05 18:10 ` Fabrice Marchant [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=20080605201010.72782a9f@free.fr \
--to=fabricemarchant@free.fr \
--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