Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Problem with ocamlmktop
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David MENTRE <dmentre@l...>
Subject: Re: [Caml-list] Problem with ocamlmktop
Hello,

Malte Obbel Forsberg <malte@unix.se> writes:

> Now, what I want to do is to use a modified toplevel for mod_ocaml, so I
> won't have to redefine my functions in every ocml (html with ocaml-code
> in it, handled by mod_ocaml) file! I suppose, being quite new to O'Caml,
> I might have missed some other way to achieve this; please enlighten me
> if that is so. :-)

You could use -I option with an absolute path when calling your home
made ocaml.

> What I want to know, then, is if there is some way to define functions
> in an external file and then use the functions in an other interpreted
> file, with "open Site;;" or similar.

Yep. #load "file-name";; or #use "file-name";; depending on your
needs. Then do a open Module or Module.function. See ocaml doc for
details.

Yours,
david
-- 
 David Mentré <dmentre@linux-france.org>

-------------------
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