From: Pierre Weis <Pierre.Weis@inria.fr>
Message-Id: <199909171244.OAA22193@pauillac.inria.fr>
Subject: Re: What am I missing?
To: skaller@maxtal.com.au (skaller)
Date: Fri, 17 Sep 1999 14:44:16 +0200 (MET DST)
In-Reply-To: <37E195CC.9E3CF558@maxtal.com.au> from "skaller" at Sep 17, 99 11:13:49 am
> Why?
>
> [root@ruby] ~/felix>ocamlc util.ml
> [root@ruby] ~/felix>ocamlc util.mli
> [root@ruby] ~/felix>ocaml
> Objective Caml version 2.02
>
> # open Util;;
> # string_of_list;;
> Reference to undefined global `Util'
When you open a module you just add the list of exported names from
that module to your current environment (the interface of the module is
loaded). The corresponding implementation must be loaded (the code has
to be linked), before using any of the names defined in the
implementation. Use the pragma #load in the interactive environment to
link the code:
Objective Caml version 2.02
# open Util;;
# #load"util.cmo";;
# string_of_list;;
- : 'a list -> string = <fun>
Best regards,
Pierre Weis
INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:25 MET