caml-list - the Caml user's mailing list
 help / color / Atom feed
From: Vadim <>
To: Thierry Martinez <>
Cc: caml-list <>
Subject: Re: [Caml-list] How to shadow nested submodules?
Date: Fri, 11 Oct 2019 19:09:12 +0300
Message-ID: <> (raw)
In-Reply-To: <>

Wow! Thank you very much! I don't know why I could not find it.<br /><br />18:40, 11 октября 2019 г., Thierry Martinez &lt;;:<br /><blockquote class="b4fd5cf2ec92bc68cb898700bb81355fwmi-quote"><p>Hello, Vadim!<br /><br />Vadim:<br /></p><blockquote class="b4fd5cf2ec92bc68cb898700bb81355fwmi-quote"> Hello! I'm trying to figure out how shadow/override nested modules in<br /> OCaml.<br /></blockquote><p><br />A generic solution for old OCaml versions (&lt;4.08) has been explained by<br />Gabriel Scherer in the following blog post:<br /><a href=""></a><br /><br />The idea is to use destructive substitution while including the original<br />Ipaddr:<br /><a href=""></a><br /><br />module Ipaddr = struct<br />  include (Ipaddr : module type of Ipaddr with module Prefix := Ipaddr.Prefix)<br />  ...<br />end<br /><br />But I guess that the code you posted should work just fine with OCaml &gt;=4.08<br />thanks to the following change:<br /><a href=""></a><br /><br />Best regards.<br /></p><span class="c18e9d485856a85513717a5a5b59d3fewmi-sign">-- <br />Thierry Martinez.</span></blockquote>

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 15:24 Vadim
2019-10-11 15:40 ` Thierry Martinez
2019-10-11 16:09   ` Vadim [this message]

Reply instructions:

You may reply publically 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:

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

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

caml-list - the Caml user's mailing list

Archives are clonable:
	git clone --mirror
	git clone --mirror

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone