From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id A95977EEEF for ; Wed, 10 Jun 2015 16:41:49 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of kennethadammiller@gmail.com) identity=pra; client-ip=209.85.214.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of kennethadammiller@gmail.com designates 209.85.214.182 as permitted sender) identity=mailfrom; client-ip=209.85.214.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ob0-f182.google.com) identity=helo; client-ip=209.85.214.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="postmaster@mail-ob0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0C0AwDzSnhVm7bWVdFcg2RfBoMYvEyFfgKBLwdMAQEBAQEBEgEBAQEBBgsLCSEuQQWDXAEBAQECARIRHQEbHQEDAQsGBQQHAwoqAgIhAQERAQUBHAYTIod2AQMKCA2gRj4xiz+Ba4J5mS0KGScNV4RpAQEBAQEBBAEBAQEBARYBBQ6LNYJNgjkHgmiBRQWLcYwfhRCBYIEwjzmDN4IREiOBDAmEOCIxAYJGAQEB X-IPAS-Result: A0C0AwDzSnhVm7bWVdFcg2RfBoMYvEyFfgKBLwdMAQEBAQEBEgEBAQEBBgsLCSEuQQWDXAEBAQECARIRHQEbHQEDAQsGBQQHAwoqAgIhAQERAQUBHAYTIod2AQMKCA2gRj4xiz+Ba4J5mS0KGScNV4RpAQEBAQEBBAEBAQEBARYBBQ6LNYJNgjkHgmiBRQWLcYwfhRCBYIEwjzmDN4IREiOBDAmEOCIxAYJGAQEB X-IronPort-AV: E=Sophos;i="5.13,587,1427752800"; d="scan'208";a="135502983" Received: from mail-ob0-f182.google.com ([209.85.214.182]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Jun 2015 16:41:48 +0200 Received: by obbgp2 with SMTP id gp2so36466017obb.2 for ; Wed, 10 Jun 2015 07:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ae6iZQw2mXS+NTWTSt1uGrFmEgGn2uhFI3kWQ80+PFo=; b=l8mDszQ3KAZ4WOeUrsTJDQF0P9Di/zrWb933BQk/JAV6+QygsMMgJR738Bu7X9Or2D Hp/6DDM5dUGRsf2AGWZfPiXdjRcDZVMKvtFq5SyVl/iOFOoMqR4YDL7LVVuPhmOk88JK bDA5fEx0Mii9dWapQlj5L4Qh7H0h4gn/v9oai2tKS7nygRg9HXJayRF7yDPb8UMUMRFB tle95GI9Po3FC7LHuhRDuE2wUHs9lBfGpJR1wWsmCd4A8+4KJIgVeKkutLsu2SSfN5f7 E/3GtNVe2WG71ff/7/+tLziI0EVli+OFvC49KJErH33zF/IyHPrqbD/7IAIZbq46THWd nFrQ== MIME-Version: 1.0 X-Received: by 10.60.134.132 with SMTP id pk4mr3189740oeb.7.1433947307426; Wed, 10 Jun 2015 07:41:47 -0700 (PDT) Received: by 10.202.191.8 with HTTP; Wed, 10 Jun 2015 07:41:47 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Jun 2015 10:41:47 -0400 Message-ID: From: Kenneth Adam Miller To: Ben Millwood Cc: caml users Content-Type: multipart/alternative; boundary=047d7b47252ce2ca1805182adf1b Subject: Re: [Caml-list] Qualifying Module Names --047d7b47252ce2ca1805182adf1b Content-Type: text/plain; charset=UTF-8 I wrote "would compile" but I was actually testing it out in utop, from which I can #require my package that defines those modules. *In utop specifically*, the first works, but the second does not. I am about to be compiling my code to test to be sure (I'm pretty sure what happens in utop corresponds closely to the compilation), but between compiles I have to recompile, reinstall my library, so my iterations are slow. Let you know in a few minutes. On Wed, Jun 10, 2015 at 10:35 AM, Ben Millwood wrote: > Your example superficially looks like it should work. Does the first > example also work if you drop the open statement? Consider the possibility > that you are actually picking up Foo from somewhere else. > > On 10 June 2015 at 15:16, Kenneth Adam Miller > wrote: > >> I ran into a quirk today- >> >> I noticed that if I first do: >> >> open My_module.Submodule >> module Blah = Foo.Bar >> >> That my code would compile, but doing this: >> >> module Blah = My_module.Submodule.Foo.Bar >> >> will *not*. Why is that? Is there any way to fully qualify a module name >> in the latter manner (the code of the latter manner was fully machine >> generated, and I would like the machine generated code not have to be >> edited). >> > > --047d7b47252ce2ca1805182adf1b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I wrote "would compile" but I was actually testi= ng it out in utop, from which I can #require my package that defines those = modules. *In utop specifically*, the first works, but the second does not. = I am about to be compiling my code to test to be sure (I'm pretty sure = what happens in utop corresponds closely to the compilation), but between c= ompiles I have to recompile, reinstall my library, so my iterations are slo= w. Let you know in a few minutes.

On Wed, Jun 10, 2015 at 10:35 AM, Ben Millwood <bmillwood@janestreet.com> wrote:
Your example superficially looks like it should w= ork. Does the first example also work if you drop the open statement? Consi= der the possibility that you are actually picking up Foo from somewhere els= e.
=
On 10 June 2015 at 15:16, Kenneth Adam Mille= r <kennethadammiller@gmail.com> wrote:
I ran into a quirk today-

<= /div>
I noticed that if I first do:

open My_mo= dule.Submodule
module Blah =3D Foo.Bar

T= hat my code would compile, but doing this:

module = Blah =3D My_module.Submodule.Foo.Bar

will *not*. W= hy is that? Is there any way to fully qualify a module name in the latter m= anner (the code of the latter manner was fully machine generated, and I wou= ld like the machine generated code not have to be edited).


--047d7b47252ce2ca1805182adf1b--