<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2005/05/7ee13064bc1230e05568f0365c62440b"
  from="Christophe TROESTLER &lt;debian00@t...&gt;"
  author="Christophe TROESTLER"
  date="2005-05-11T16:33:34"
  subject="Re: [Caml-list] Renaming structures during inclusions?"
  prev="2005/05/4d2ef87a667ec8c5e2fc34351c0bf627"
  next="2005/05/37b42687d04995fbcb5062ee307bedae"
  prev-in-thread="2005/05/4d2ef87a667ec8c5e2fc34351c0bf627"
  next-in-thread="2005/05/37b42687d04995fbcb5062ee307bedae"
  prev-thread="2005/05/673536cfea964e1a6113b5a44033866d"
  next-thread="2005/05/428d4fa76763d222dd5a06d729908ab9"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Renaming structures during inclusions?">
<msg 
  url="2005/05/4d2ef87a667ec8c5e2fc34351c0bf627"
  from="Markus Mottl &lt;markus.mottl@g...&gt;"
  author="Markus Mottl"
  date="2005-05-11T15:44:17"
  subject="Renaming structures during inclusions?">
<msg 
  url="2005/05/7ee13064bc1230e05568f0365c62440b"
  from="Christophe TROESTLER &lt;debian00@t...&gt;"
  author="Christophe TROESTLER"
  date="2005-05-11T16:33:34"
  subject="Re: [Caml-list] Renaming structures during inclusions?">
<msg 
  url="2005/05/37b42687d04995fbcb5062ee307bedae"
  from="Andreas Rossberg &lt;rossberg@p...&gt;"
  author="Andreas Rossberg"
  date="2005-05-11T17:12:04"
  subject="Re: [Caml-list] Renaming structures during inclusions?">
<msg 
  url="2005/05/3abc8201379e2ef20e8b76b1b198d8aa"
  from="Markus Mottl &lt;markus.mottl@g...&gt;"
  author="Markus Mottl"
  date="2005-05-11T18:02:39"
  subject="Re: [Caml-list] Renaming structures during inclusions?">
<msg 
  url="2005/05/0d29d4a050051c575f2b0806b9409976"
  from="Andreas Rossberg &lt;rossberg@p...&gt;"
  author="Andreas Rossberg"
  date="2005-05-12T14:24:54"
  subject="Re: [Caml-list] Renaming structures during inclusions?">
</msg>
</msg>
<msg 
  url="2005/05/32852c0e9441fd5cacc1b63046dc78af"
  from="Christophe TROESTLER &lt;debian00@t...&gt;"
  author="Christophe TROESTLER"
  date="2005-05-11T18:16:32"
  subject="Re: [Caml-list] Renaming structures during inclusions?">
</msg>
</msg>
</msg>
<msg 
  url="2005/05/13030773278c40d6367360759638756e"
  from="Jacques Garrigue &lt;garrigue@m...&gt;"
  author="Jacques Garrigue"
  date="2005-05-12T01:25:05"
  subject="Re: [Caml-list] Renaming structures during inclusions?">
<msg 
  url="2005/05/f21910b0fdba032abfe6aae9cf36141e"
  from="Markus Mottl &lt;markus.mottl@g...&gt;"
  author="Markus Mottl"
  date="2005-05-12T17:10:01"
  subject="[Caml-list] Renaming structures during inclusions?">
</msg>
</msg>
<msg 
  url="2005/05/f8b848426e6b4dc35e7b225e865f69ff"
  from="Norman Ramsey &lt;nr@e...&gt;"
  author="Norman Ramsey"
  date="2005-05-12T15:26:35"
  subject="Re: [Caml-list] Renaming structures during inclusions? ">
</msg>
<msg 
  url="2005/05/7982251841eb7d842da9dfde066e3729"
  from="Aleksey Nogin &lt;nogin@c...&gt;"
  author="Aleksey Nogin"
  date="2005-05-12T20:02:20"
  subject="Re: [Caml-list] Renaming structures during inclusions?">
</msg>
</msg>
</thread>

<contents>
On Wed, 11 May 2005, Markus Mottl &lt;markus.mottl@gmail.com&gt; wrote:
&gt; 
&gt; The above is not possible, because the names for type t in M1 and M2,
&gt; and the module names for module Std clash.

Wouldn't it be better to have a compiler switch (say "-w T/t", off by
default) to overide that behavior (new definitions override old ones
as with [open])?  Of course that makes it impossible to write M1
signature without aliasing [t] and [Std] but IMHO that's fine.  This
way, no new syntax needs to be introduced (and one is not forced to
alias modules one does not care about -- e.g. utilities).

module M = struct
  include M1
  type m1_t = M1.t
  module M1Std = M1.Std

  include M2
  type m2_t = M2.t
  module M2Std = M2.Std

  module Std = struct
    include M1.Std
    include M2.Std
  end
end

My 2¢,
ChriS

</contents>

</message>

