Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlmktop has a weird behaviour
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Loup Vaillant <loup.vaillant@g...>
Subject: ocamlmktop has a weird behaviour
Hello,
I am trying to write a makefile entry to build an ocaml toplevel
(version 3.11.1, default Ubuntu 9.10 install).

My problem is very simple. First, the following works as expected:

$ ls lib
batteries.ml
$ cd lib
$ ocamlc -c batteries.ml
$ ocamlmktop -o ../ocamltop batteries.cmo
$ ../ocamltop
        Objective Caml version 3.11.1

# open Batteries;;
#

The module Batteries has been loaded in the interactive loop as
intended. Now, this *doesn't* work:

$ ls lib
batteries.ml
$ ocamlc -c lib/batteries.ml
$ ocamlmktop -o ocamltop -I lib batteries.cmo
$ ocamltop
        Objective Caml version 3.11.1

# open Batteries;;
Error: Unbound module Batteries
#

??? This looks like a super-obvious bug, so I must have overlook
something. Any idea what? Is it possible to built a sensible toplevel
with libraries *not* in the current directory? How?

Thanks,
Loup.