<?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/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?"
  prev="2005/05/3abc8201379e2ef20e8b76b1b198d8aa"
  next="2005/05/839576f084d909ebd28f2dd64dbf5018"
  prev-in-thread="2005/05/0d29d4a050051c575f2b0806b9409976"
  next-in-thread="2005/05/13030773278c40d6367360759638756e"
  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, Andreas Rossberg &lt;rossberg@ps.uni-sb.de&gt; wrote:
&gt; 
&gt; Note that OCaml's type system fundamentally relies on the fact that
&gt; type names cannot be shadowed in structures.

Yes, you are correct -- I was thinking of checking the sig against a
given one, not to generate it.

&gt; the compiler had to figure out that it can break the dependency on
&gt; the first t by reordering m1_t relative to the fields from M1 in the
&gt; derived signature and substituting m1_t for t in these fields, [...]
&gt; it is *far* from obvious if and how this can be inferred in general,
&gt; particularly when your modules go higher-order.
&gt; 
&gt; I believe it would require something akin to join and meet operations on 
&gt; signatures, but it is known that these don't exist for some very similar 
&gt; systems (signatures for higher-order modules don't form a lattice).

The substitution in itself is nothing difficult, isn't it.  Or is it
because you need to "backtrack" to change the inferred sigs?  Is the
problem when to do it?  Do you have examples?  I do not immediately
see why a rule like "duplicate types/modules are forbidden in a sig
unless one of them is explicitely renamed" would be difficult to check[1].

On the other hand, one may also argue that Markus proposal is cleaner.

Regards,
ChriS


[1] E.g. -- the simpler -- when the shadowing occurs (this is already
detected), an alternative name for the type must be available.

</contents>

</message>

