* [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
* Re: [Caml-list] ocaml #load
2003-08-28 15:25 ` Jean-Christophe Filliatre
@ 2003-08-30 15:29 ` Dimitri Ara
0 siblings, 0 replies; 5+ messages in thread
From: Dimitri Ara @ 2003-08-30 15:29 UTC (permalink / raw)
To: caml-list
Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr> a écrit :
> ocamldsort is what you need; get it at http://dimitri.mutu.net/ocaml.html
The latest version of ocamldsort (0.14) which was available on
my site when Jean-Christophe wrote this mail was buggy (actually the
makefile was buggy). If you've tried ocamldsort these days, please download
the new version (0.14.1) :
ftp://quatramaran.ens.fr/pub/ara/ocamldsort/ocamldsort-0.14.1.tar.gz
--
Dimitri
-------------------
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:32 ` Nicolas Cannasse
@ 2003-09-03 10:40 ` Eray Ozkural
0 siblings, 0 replies; 5+ messages in thread
From: Eray Ozkural @ 2003-09-03 10:40 UTC (permalink / raw)
To: caml-list
Doesn't haskell ghc interpreter do this automatically? This looks like
somethign that could be handled by the interpreter itself, chasing modules.
On Thursday 28 August 2003 18:32, Nicolas Cannasse wrote:
> ". 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
--
Eray Ozkural (exa) <erayo@cs.bilkent.edu.tr>
Comp. Sci. Dept., Bilkent University, Ankara KDE Project: http://www.kde.org
www: http://www.cs.bilkent.edu.tr/~erayo Malfunction: http://mp3.com/ariza
GPG public key fingerprint: 360C 852F 88B0 A745 F31B EA0F 7C07 AE16 874D 539C
-------------------
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
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