Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Test release Objective Caml 3.03 Alpha
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Test release Objective Caml 3.03 Alpha
Hi,

On Sun, Oct 14, 2001 at 08:08:08PM +0200, Christophe TROESTLER wrote:

> However the script mode i.e., ocaml file.ml, fails even with file.ml
> being as simple as
> ---------------------------------------- 
> #load "camlp4o.cma"
> 
> let f = parser
>   | [< _ >] -> 0
> ----------------------------------------
> What is the problem ?

The problem is that the "#use" toplevel directive first parses the
file and, *afterwards* applies what is inside (directives, typing and
execution). The "#load" directive is then applied too late. You must
first type your #load "camlp4o.cma" then you can #use the files you
want.

Another solution is to create a file named ".ocamlinit" in your current
directory (*current*, not *home*) containing #load "camlp4r.cma";;

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr