caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jérémie Lumbroso" <jeremie.lumbroso@etu.upmc.fr>
To: caml-list@inria.fr
Subject: Re: Multiple value declaration in .mli file
Date: Fri, 15 Aug 2008 19:36:35 +0200	[thread overview]
Message-ID: <2b7b425b0808151036q18dec4a5pb9af5d6fcaea3f02@mail.gmail.com> (raw)
In-Reply-To: <2b7b425b0808151007t57f89671s91727e328b888f8e@mail.gmail.com>

On Fri, Aug 15, 2008 at 7:07 PM, Jérémie Lumbroso
<jeremie.lumbroso@etu.upmc.fr> wrote:

>> I guess you need it to mirror the value shadowing on the implementation side:
>>    include Foo
>>    let bar = baz
>>
>> This is legal if Foo already defines bar, and most of the time desired and
>> useful.
>> In the interface file you'll want to write :
>>   include FOO (* Foo's signature *)
>>   val bar : ...
>
> Actually, this is untrue. I think that up until recently (3.09.2?), what
> you describe would have caused an error (one of the many annoying things
> about signatures in ML languages that prompted that clever paper by Ramsey
> et al.).

I may have gotten carried away! :-) I was thinking of type
definitions, and have no idea if the behavior for values was the same.

  <toplevel>
  # module type Foo = sig type t = int end;;
  module type Foo = sig type t = int end

  # module type Bar = sig include Foo type t = string end;;
  Multiple definition of the type name t.
  Names must be unique in a given structure or signature.
  </toplevel>

Jérémie


  reply	other threads:[~2008-08-15 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15 17:07 Jérémie Lumbroso
2008-08-15 17:36 ` Jérémie Lumbroso [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-14 16:25 mohamed iguernelala

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=2b7b425b0808151036q18dec4a5pb9af5d6fcaea3f02@mail.gmail.com \
    --to=jeremie.lumbroso@etu.upmc.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;
as well as URLs for NNTP newsgroup(s).