Version française
Home     About     Download     Resources     Contact us    
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: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] ocaml #load
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