From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id E10E9BBAF for ; Fri, 9 Jan 2009 18:33:11 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkBAN8YZ0nUGyoGlGdsb2JhbACUEQEBAQEJCwgJEQO7fIVvhC0 X-IronPort-AV: E=Sophos;i="4.37,239,1231110000"; d="scan'208";a="21264409" Received: from smtp6-g21.free.fr ([212.27.42.6]) by mail3-smtp-sop.national.inria.fr with ESMTP; 09 Jan 2009 18:33:11 +0100 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id E6853E089D9; Fri, 9 Jan 2009 18:33:05 +0100 (CET) Received: from [192.168.17.1] (ivr94-8-88-162-26-239.fbx.proxad.net [88.162.26.239]) by smtp6-g21.free.fr (Postfix) with ESMTP id ECAB4E08937; Fri, 9 Jan 2009 18:33:02 +0100 (CET) Message-ID: <49678A64.60907@users.sourceforge.net> Date: Fri, 09 Jan 2009 18:33:24 +0100 From: Zheng Li User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b3pre) Gecko/20090105 Lightning/1.0pre Shredder/3.0b2pre MIME-Version: 1.0 To: Dawid Toton Cc: caml-list@yquem.inria.fr Subject: Re: Toplevel - load cmo from given location References: <496759E1.3070104@uj.edu.pl> In-Reply-To: <496759E1.3070104@uj.edu.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; toplevel:01 cmo:01 usr:01 ocamlrun:01 ocaml:01 enum:01 cmo:01 enum:01 cmi:01 toplevel:01 cmi:01 2009:98 sourceforge:01 unbound:01 wrote:01 Hi, On 1/9/2009 3:06 PM, Dawid Toton wrote: > But this version not (using the full path directly): > > #!/usr/bin/ocamlrun ocaml > #load "/home/dt2/Calc1/CalcEngine/src/_build/extlib/enum.cmo" > open Enum > > The problem is that it gives "Unbound module Enum" while no error about > loading the cmo&cmi is shown. It's because the toplevel doesn't have the "/home/dt2/..." in its paths, so it doesn't know where the enum.cmi is. > So: > * if it finds correctly the enum.cmi: why "open Enum" doesn't work? No, it doesn't find the enum.cmi > * if the cmi is not found, why I see no message like "*Cannot find file > */home/dt2/Calc1/CalcEngine/src/_build/extlib/enum.cmi*" - as chapter The enum.cmi was there, it was because the toplevel didn't know about this path. So it had the same effect as accessing a non-existed module or a module existed but not in the known paths (e.g. open NoSuchModule). > 9.4 of docs suggests? Does the toplevel check for the cmi in the same > location as cmo? * No. Basically, cmi and cmo are two different things. You using one doesn't mean you'll use the other. Using the "directory" directive or launching toplevel with "-I" parameters can add extra paths to toplevel (for accessing both cmi and cmo). HTH. -- Zheng