* [Caml-list] ocaml #load
@ 2003-08-28 15:08 Sean McLaughlin
2003-08-28 15:25 ` Jean-Christophe Filliatre
2003-08-28 15:32 ` Nicolas Cannasse
0 siblings, 2 replies; 5+ messages in thread
From: Sean McLaughlin @ 2003-08-28 15:08 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
Hello,
I'm building a large program in ocaml that I'll want to run using the
interpreter. It is a nuisance having to load all the files in the
correct order. There is the ocamldep tool for compiling,but I can't
find a similar tool or function for loading into the top level. Is
there such a tool that, say, when I type ' #load 'd.cmo', and d depends
on c, c on b, b on a, somehow loads a then b then c then d? I can
imagine a simple tool that runs ocamldep and repeatedly greps the
makefile and adds lines like "#load d.cmo" to a text file until a fixed
point is reached.
Thanks,
Sean
[-- Attachment #2: Type: text/html, Size: 1653 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] ocaml #load
2003-08-28 15:08 [Caml-list] ocaml #load Sean McLaughlin
@ 2003-08-28 15:25 ` Jean-Christophe Filliatre
2003-08-30 15:29 ` Dimitri Ara
2003-08-28 15:32 ` Nicolas Cannasse
1 sibling, 1 reply; 5+ messages in thread
From: Jean-Christophe Filliatre @ 2003-08-28 15:25 UTC (permalink / raw)
To: Sean McLaughlin; +Cc: caml-list
Sean McLaughlin writes:
>
> I'm building a large program in ocaml that I'll want to run using the
> interpreter. It is a nuisance having to load all the files in the
> correct order. There is the ocamldep tool for compiling,but I can't
> find a similar tool or function for loading into the top level. Is
> there such a tool that, say, when I type ' #load 'd.cmo', and d depends
> on c, c on b, b on a, somehow loads a then b then c then d? I can
> imagine a simple tool that runs ocamldep and repeatedly greps the
> makefile and adds lines like "#load d.cmo" to a text file until a fixed
> point is reached.
This has already been discussed on this list; see the archive.
ocamldsort is what you need; get it at http://dimitri.mutu.net/ocaml.html
Another solution is to have your Makefile building a custom toplevel
with your code (you still need to write modules in the right order in
your Makefile but you'll probably end up doing it anyway).
Hope this helps,
--
Jean-Christophe Filliâtre
-------------------
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] ocaml #load
2003-08-28 15:08 [Caml-list] ocaml #load Sean McLaughlin
2003-08-28 15:25 ` Jean-Christophe Filliatre
@ 2003-08-28 15:32 ` Nicolas Cannasse
2003-09-03 10:40 ` Eray Ozkural
1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Cannasse @ 2003-08-28 15:32 UTC (permalink / raw)
To: Sean McLaughlin, caml-list
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
Message I'm building a large program in ocaml that I'll want to run using the interpreter. It is a nuisance having to load all the files in the correct order. There is the ocamldep tool for compiling,but I can't find a similar tool or function for loading into the top level. Is there such a tool that, say, when I type ' #load 'd.cmo', and d depends on c, c on b, b on a, somehow loads a then b then c then d? I can imagine a simple tool that runs ocamldep and repeatedly greps the makefile and adds lines like "#load d.cmo" to a text file until a fixed point is reached.
One other solution is to build a CMA containing the list of the CMO you want to load in the right order (using ocamlc -a flag).
Nicolas Cannasse
[-- Attachment #2: Type: text/html, Size: 1618 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-03 10:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-28 15:08 [Caml-list] ocaml #load Sean McLaughlin
2003-08-28 15:25 ` Jean-Christophe Filliatre
2003-08-30 15:29 ` Dimitri Ara
2003-08-28 15:32 ` Nicolas Cannasse
2003-09-03 10:40 ` Eray Ozkural
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox