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
Re: [Caml-list] how to use a module
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-06-30 (20:28)
From: Jean-Baptiste Rouquier <jb.rouquier@w...>
Subject: Re: [Caml-list] how to use a module
>I'm having trouble (using the modules or the files that I wrote)   (in the
interactive mode of  OCaml).

(*First, let Caml know where you put your files if they aren't in the
current directory :*)
#directory "foo/bar";;

(*This is the "include" directive (see the manual) :*)
#use "";;

(*if you file is already compiled, you can use :*)
#load "qux.cmo";;

(*but you have to "#load" all the files that egg uses, for instance if contains "Graphics.open_graph", then you must load graphics before
(as when you link the main programm) :*)
#load "graphics.cma";;
#load "egg.cmo";;

(*If you want to state "quz ()" instead of "Egg.quz ()", just open this
module (it requires egg.cmi in the list of searching directories) :*)
open Egg;;


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: