From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6D353BB84 for ; Fri, 15 Aug 2008 19:38:43 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhICAE5cpUjAXQIniGdsb2JhbACRRj4BAQEPIJs4hmEBAoNp X-IronPort-AV: E=Sophos;i="4.32,216,1217800800"; d="scan'208";a="16151818" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 15 Aug 2008 19:38:43 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m7FHcgrN003417 for ; Fri, 15 Aug 2008 19:38:43 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhMBAAVcpUjRVciqlGdsb2JhbACRRj4BAQEBCQMKBxEDmzWGYQECg2k X-IronPort-AV: E=Sophos;i="4.32,216,1217800800"; d="scan'208";a="16020635" Received: from wf-out-1314.google.com ([209.85.200.170]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Aug 2008 19:36:37 +0200 Received: by wf-out-1314.google.com with SMTP id 25so1263880wfa.0 for ; Fri, 15 Aug 2008 10:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=j1o7OnLDqIxcW6cEyESm36yzvZOhQyPPbv1OCaIphQs=; b=q00ukh/U0gaUj/o3CWv6/8YaH7s/P2JrBPgWfwjJ1VM/qGL1KZ+56HfCXUTyh3qnkf Qf21u2XoteYFa/RZ7xr7Tka4A6pZGjIJ++2Iovm0Jp8Ndq5EB19nguuJqetAZHBzJ9h6 hdlrCMFc+avtgZCRDLI9UenxJ9BR3ri31gBE8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=Gf1+ZAJnudNiLwkNfnxnpHo7Tf1rzFXWX6vLLPEtBcm0AxvANXcOARCCEtJLCK5uwT hHKiy8iP+MkHEaTT0myc46ZP3IjRizolCX7+MAJuJkbC1Xa2GNRoXFXlJ/upXTsXM9EY 4hMSMIQVIiWtNgsHtOPNy8ag4IIqA0AiS1rA4= Received: by 10.142.214.11 with SMTP id m11mr1069077wfg.95.1218821795857; Fri, 15 Aug 2008 10:36:35 -0700 (PDT) Received: by 10.142.105.11 with HTTP; Fri, 15 Aug 2008 10:36:35 -0700 (PDT) Message-ID: <2b7b425b0808151036q18dec4a5pb9af5d6fcaea3f02@mail.gmail.com> Date: Fri, 15 Aug 2008 19:36:35 +0200 From: "=?ISO-8859-1?Q?J=E9r=E9mie_Lumbroso?=" Sender: jeremie.lumbroso@gmail.com To: caml-list@inria.fr Subject: Re: Multiple value declaration in .mli file In-Reply-To: <2b7b425b0808151007t57f89671s91727e328b888f8e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2b7b425b0808151007t57f89671s91727e328b888f8e@mail.gmail.com> X-Google-Sender-Auth: 2afa000b1411cebc X-Miltered: at concorde with ID 48A5BF22.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; mli:01 foo:01 baz:01 foo:01 val:01 toplevel:01 sig:01 sig:01 toplevel:01 wrote:01 signatures:01 defines:01 int:01 int:01 declaration:02 On Fri, Aug 15, 2008 at 7:07 PM, J=E9r=E9mie Lumbroso wrote: >> I guess you need it to mirror the value shadowing on the implementation = side: >> include Foo >> let bar =3D baz >> >> This is legal if Foo already defines bar, and most of the time desired a= nd >> 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 Ramse= y > 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. # module type Foo =3D sig type t =3D int end;; module type Foo =3D sig type t =3D int end # module type Bar =3D sig include Foo type t =3D string end;; Multiple definition of the type name t. Names must be unique in a given structure or signature. J=E9r=E9mie