<?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="2009/01/c56de9ea8eab932fc48cbbe52c2aff41"
  from="Peng Zang &lt;peng.zang@g...&gt;"
  author="Peng Zang"
  date="2009-01-09T17:53:24"
  subject="Re: [Caml-list] Toplevel - loading dependencies"
  prev="2009/01/f8a33f74e66883b70cf383c45b74875b"
  next="2009/01/28ab596a711780efefe765f0d5873dc1"
  prev-in-thread="2009/01/68a29877bfbd573954edce82da5f896a"
  prev-thread="2009/01/2112b46e78c48d5a1e210bbd83ebb31a"
  next-thread="2009/01/28ab596a711780efefe765f0d5873dc1"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Toplevel - loading dependencies">
<msg 
  url="2009/01/8098af0c31ee2dfc908c6c4b9d081e1e"
  from="Dawid Toton &lt;dawid.toton@u...&gt;"
  author="Dawid Toton"
  date="2009-01-09T14:23:39"
  subject="Toplevel - loading dependencies">
<msg 
  url="2009/01/7bdc002ffff85262050bac81b75cb3df"
  from="Matthieu Dubuget &lt;matthieu.dubuget@g...&gt;"
  author="Matthieu Dubuget"
  date="2009-01-09T14:35:23"
  subject="Re: [Caml-list] Toplevel - loading dependencies">
</msg>
<msg 
  url="2009/01/7dd8b17723f54e4e1f984f635aa1d367"
  from="Florent Monnier &lt;fmonnier@l...&gt;"
  author="Florent Monnier"
  date="2009-01-09T17:15:36"
  subject="Re: [Caml-list] Toplevel - loading dependencies">
<msg 
  url="2009/01/68a29877bfbd573954edce82da5f896a"
  from="Dawid Toton &lt;d0@w...&gt;"
  author="Dawid Toton"
  date="2009-01-09T18:13:14"
  subject="Re: [Caml-list] Toplevel - loading dependencies">
</msg>
</msg>
<msg 
  url="2009/01/c56de9ea8eab932fc48cbbe52c2aff41"
  from="Peng Zang &lt;peng.zang@g...&gt;"
  author="Peng Zang"
  date="2009-01-09T17:53:24"
  subject="Re: [Caml-list] Toplevel - loading dependencies">
</msg>
</msg>
</thread>

<contents>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shouldn't ocamldep be able to solve this?  It can read a source file and 
figure out the dependencies.  So you could in theory generate a fake source 
file that is just "open A" and it should figure out the set of dependencies 
for module A.

Peng

On Friday 09 January 2009 09:23:35 am Dawid Toton wrote:
&gt; Another problem with loading modules in the toplevel:
&gt; I need to use the module A. So I write:
&gt; #load "A.cmo"
&gt; to get a messsage "Reference to undefined global B"
&gt; So I prepend a line:
&gt; #load B.cmo
&gt;  and get another "undefined global". Then it repeats prohibitively many
&gt; times.
&gt; This is resolving dependencies by hand, one by one.
&gt;
&gt; The solution would be to have a special version of cmo that knows
&gt; locations of all other cmo's it depends on.
&gt;
&gt; In special cases I could use cma archives, but this is only applicable
&gt; when there is well defined and stable set of modules I need.
&gt; But in practice the modules I use in ocaml scripts are constantly
&gt; evolving. It leads to having multiple cma aggregates and maintaining
&gt; their building description. Again, lots of work.
&gt;
&gt; If I put everything into one big cma, then I have to recompile it every
&gt; small change. It takes so long time, that it would make no sense to use
&gt; the interpreter at all.
&gt;
&gt; Could I ask ocamlbuild to produce proper loading preamble for my scripts?
&gt;
&gt; What is the right solution?
&gt;
&gt; Dawid
&gt;
&gt; _______________________________________________
&gt; Caml-list mailing list. Subscription management:
&gt; http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
&gt; Archives: http://caml.inria.fr
&gt; Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
&gt; Bug reports: http://caml.inria.fr/bin/caml-bugs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFJZ48PfIRcEFL/JewRAvcBAJ93neP1/3O6GCqImp4PP/UPTd/iCACfeyTn
zFNLx2UjBo6pkgb9z3a0NPk=
=6+qX
-----END PGP SIGNATURE-----

</contents>

</message>

