<?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="2003/11/65633c1752df3e2bba3cd125d0cb4054"
  from="Damien &lt;Damien.Pous@e...&gt;"
  author="Damien"
  date="2003-11-11T17:24:00"
  subject="Re: [Caml-list] type issues with modules"
  prev="2003/11/2fe7f757bc7b5d10efc2915878644160"
  next="2003/11/ae2317e348119907279987d644ffa2ec"
  prev-in-thread="2003/11/4ae1225ca603ad7ed2d2972c89a080a0"
  next-in-thread="2003/11/d0eed6c769ba31ae73ab39ba3e7c5d4f"
  prev-thread="2003/11/aec9ff3da1a5c8e937e938441c778914"
  next-thread="2003/11/e506f6dcbfdcb3186798daea27c0bc18"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] type issues with modules">
<msg 
  url="2003/11/6c7eeee8f6105aa3a5ef377169475e2c"
  from="Chris GauthierDickey &lt;chrisg@c...&gt;"
  author="Chris GauthierDickey"
  date="2003-11-11T05:34:02"
  subject="[Caml-list] type issues with modules">
<msg 
  url="2003/11/4ae1225ca603ad7ed2d2972c89a080a0"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-11-11T08:21:56"
  subject="Re: [Caml-list] type issues with modules">
<msg 
  url="2003/11/65633c1752df3e2bba3cd125d0cb4054"
  from="Damien &lt;Damien.Pous@e...&gt;"
  author="Damien"
  date="2003-11-11T17:24:00"
  subject="Re: [Caml-list] type issues with modules">
<msg 
  url="2003/11/d0eed6c769ba31ae73ab39ba3e7c5d4f"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-11-12T01:12:24"
  subject="Re: [Caml-list] type issues with modules">
<msg 
  url="2003/11/a493c676415d2097c4bf8c63da328c5c"
  from="Remi Vanicat &lt;vanicat@l...&gt;"
  author="Remi Vanicat"
  date="2003-11-12T12:50:56"
  subject="Re: [Caml-list] type issues with modules">
</msg>
<msg 
  url="2003/11/db0b7771330fb626e89501442c3c06f5"
  from="Issac Trotts &lt;ijtrotts@n...&gt;"
  author="Issac Trotts"
  date="2003-11-13T21:30:31"
  subject="Re: [Caml-list] type issues with modules">
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
On Tue, 11 Nov 2003 17:21:47 +0900 Jacques Garrigue wrote:
&gt; As specified in the reference manual, the combination of .ml and .mli
&gt; is expected to mean:
&gt;   module type Sig_mod1 = sig &lt;mod1.mli&gt; end
&gt;   module Struct_mod1 = struct &lt;mod1.ml&gt; end
&gt;   module Mod1 : Sig_mod1 = Struct_mod1

Let's be a bit fussy...
 
The manual says :
&lt;&lt;
	module Mod1: sig &lt;mod1.mli&gt; end = struct &lt;mod1.ml&gt; end
&gt;&gt;

Hopefully, because the first translation would export hidden parts of
Mod1 via Struct_mod1.

But I think that giving a name to the signature of Mod1 (Sig_mod1) could
be useful :

&lt;&lt;
	module type MOD1 : sig &lt;mod1.mli&gt; end
	module Mod1 : MOD1 = struct &lt;mod1.ml&gt; end
&gt;&gt;

Especially when hand-packing some modules : 
"ocamlc -pack" checks the packed cmo against an optional interface file,
but the latter is rather boring to write, since one has to copy&amp;paste
the content of each packed interface.

If the module types were given a name, one could just write 
&lt;&lt;
	module Mod1: MOD1
	...
&gt;&gt;

damien

PS: I tried "module Mod1: Sig_mod1", of course it doesn't work :-(

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

