<?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/01/7b4356fccebf28ce028122d7511e4854"
  from="Julien Signoles &lt;Julien.Signoles@l...&gt;"
  author="Julien Signoles"
  date="2003-01-15T17:48:55"
  subject="[Caml-list] Re: Legality of using module types from .mli in .ml"
  prev="2003/01/d68f500a1b2410c0abf79fecd45781d3"
  next="2003/01/7b6361f24dd6b0d3f8de50aee87acff6"
  prev-in-thread="2003/01/d68f500a1b2410c0abf79fecd45781d3"
  next-in-thread="2003/01/5ca757063c7fae3284cbb1919186faa3"
  prev-thread="2003/01/6b3b8aa926b31df45c1942e68097615c"
  next-thread="2003/01/a2655a29f853a3b70108ffd4274e4fa2"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Legality of using module types from .mli in .ml">
<msg 
  url="2003/01/b4e7497511793e9b3526abc8b6da6d2d"
  from="Thorsten Ohl &lt;ohl@p...&gt;"
  author="Thorsten Ohl"
  date="2003-01-14T21:06:43"
  subject="[Caml-list] Legality of using module types from .mli in .ml">
<msg 
  url="2003/01/c93ae47484a0ce585b8050618e59f3d0"
  from="Julien Signoles &lt;Julien.Signoles@l...&gt;"
  author="Julien Signoles"
  date="2003-01-15T16:33:59"
  subject="[Caml-list] Re: Legality of using module types from .mli in .ml">
<msg 
  url="2003/01/d68f500a1b2410c0abf79fecd45781d3"
  from="Thorsten Ohl &lt;ohl@p...&gt;"
  author="Thorsten Ohl"
  date="2003-01-15T17:50:43"
  subject="[Caml-list] Re: Legality of using module types from .mli in .ml">
<msg 
  url="2003/01/7b4356fccebf28ce028122d7511e4854"
  from="Julien Signoles &lt;Julien.Signoles@l...&gt;"
  author="Julien Signoles"
  date="2003-01-15T17:48:55"
  subject="[Caml-list] Re: Legality of using module types from .mli in .ml">
<msg 
  url="2003/01/5ca757063c7fae3284cbb1919186faa3"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-01-15T21:58:04"
  subject="Re: [Caml-list] Re: Legality of using module types from .mli in .ml">
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
&gt;     ohl@wptx47:~misc$ ocamldefun -v
&gt;     1.02
&gt;     ohl@wptx47:~misc$ cat a.mli
&gt;     module type T = sig val n : int end
&gt;     module M : T
&gt;     ohl@wptx47:~misc$ cat a.ml
&gt;     module type T = A.T
&gt;     module M : T = struct let n = 42 end
&gt;     ohl@wptx47:~misc$ ocamldefun -d defun a.mli a.ml
&gt;     ohl@wptx47:~misc$ cd defun/
&gt;     ohl@wptx47:~defun$ ls
&gt;     a.cmd  a.ml
&gt;     ohl@wptx47:~defun$ cat a.ml
&gt;     module type T = A.T
&gt;     module M = struct let n = 42 end
&gt;     ohl@wptx47:~defun$ ocamlopt a.ml
&gt;     File "a.ml", line 1, characters 16-19:
&gt;     Unbound module type A.T
&gt; 
&gt; I could ignore appendix B of the manual and create a a.cmi:
&gt; 
&gt;     ohl@wptx47:~defun$ cp ../a.mli .
&gt;     ohl@wptx47:~defun$ ocamlc a.mli
&gt;     ohl@wptx47:~defun$ ocamlopt a.ml
&gt; 
&gt; but I'm not supposed to do that, am I?

Effectively, you're not supposed to do that (except if you're sure that
the problem of the appendix B cannot be appear in your program).

Julien Signoles.
-- 
mailto : Julien.Signoles@lri.fr ; http : www.lri.fr/~signoles
"In theory, practice and theory are the same, 
but in practice they are different" (Larry McVoy)
-------------------
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>

