Version franēaise
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocaml #load
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] ocaml #load

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

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 Archives:
Bug reports: FAQ:
Beginner's list: