From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id BE205BBAF for ; Mon, 28 Jun 2010 00:37:44 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIIAKdvJ0zVBIoEY2dsb2JhbACSfIYjewOFDgsXCQoIEAUfvhaFJAQ X-IronPort-AV: E=Sophos;i="4.53,492,1272837600"; d="scan'208";a="62275702" Received: from impaqm4.telefonica.net ([213.4.138.4]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Jun 2010 00:37:44 +0200 Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm4.telefonica.net with bizsmtp id bAQE1e00n2jdgqJ3QAdjqX; Mon, 28 Jun 2010 00:37:43 +0200 Received: from NANA.localdomain ([83.60.164.131]) by IMPmailhost5.adm.correo with BIZ IMP id bAdj1e0012qQu431lAdjww; Mon, 28 Jun 2010 00:37:43 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="ferferse$telefonica.net" |auth_email="ferferse@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: from mfp by NANA.localdomain with local (Exim 4.69) (envelope-from ) id 1OT0Tu-00053w-Mv for caml-list@inria.fr; Mon, 28 Jun 2010 00:37:42 +0200 Date: Mon, 28 Jun 2010 00:37:42 +0200 From: Mauricio Fernandez To: caml-list@inria.fr Subject: Re: [Caml-list] ocamlmktop has a weird behaviour Message-ID: <20100627223742.GE3718@NANA.localdomain> Mail-Followup-To: caml-list@inria.fr References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Spam: no; 0.00; ocamlmktop:01 0200,:01 lib:01 lib:01 ocamlc:01 ocamlmktop:01 cmo:01 ocamlc:01 cmo:01 bug:01 toplevel:01 cmi:01 toplevel:01 unbound:01 wrote:01 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