From: Mauricio Fernandez <mfp@acm.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlmktop has a weird behaviour
Date: Mon, 28 Jun 2010 00:37:42 +0200 [thread overview]
Message-ID: <20100627223742.GE3718@NANA.localdomain> (raw)
In-Reply-To: <AANLkTikbbM4O83YQkyd4t5j5XU9-MrMl6og1_OowXNX1@mail.gmail.com>
On Sun, Jun 27, 2010 at 07:34:08PM +0200, Loup Vaillant wrote:
> 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?
The problem is not the library itself, but rather the associated .cmi files,
which the toplevel requires. You can either give the -I lib arguments to
ocamltop, or use the #directory "lib";; directive in the toplevel.
--
Mauricio Fernandez - http://eigenclass.org
prev parent reply other threads:[~2010-06-27 22:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-27 17:34 Loup Vaillant
2010-06-27 17:48 ` [Caml-list] " Stéphane Glondu
2010-06-27 22:37 ` Mauricio Fernandez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100627223742.GE3718@NANA.localdomain \
--to=mfp@acm.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).