English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2001-10-14 (18:28)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Test release Objective Caml 3.03 Alpha

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

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

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