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=0.6 required=5.0 tests=NO_REAL_NAME autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id D1571BBAF for ; Sat, 10 Oct 2009 11:30:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4CAPbwz0rEGfDcmWdsb2JhbACBUZk7AQEBAQEICwoHE71+hC0E X-IronPort-AV: E=Sophos;i="4.44,536,1249250400"; d="scan'208";a="48337381" Received: from rrba-ip-smtp-2-2.saix.net ([196.25.240.220]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Oct 2009 11:30:02 +0200 Received: from apu.softwarerealisations.com (dsl-240-167-26.telkomadsl.co.za [41.240.167.26]) by rrba-ip-smtp-2-2.saix.net (Postfix) with ESMTP id 79FB8229 for ; Sat, 10 Oct 2009 11:29:59 +0200 (SAST) Received: from www.softwarerealisations.com (localhost.localdomain [127.0.0.1]) by apu.softwarerealisations.com (8.14.2/8.12.10) with ESMTP id n9A8dkaC004100 for ; Sat, 10 Oct 2009 10:39:46 +0200 Received: from 41.177.16.252 (SquirrelMail authenticated user rouanvd); by www.softwarerealisations.com with HTTP; Sat, 10 Oct 2009 10:39:46 +0200 (SAST) Message-ID: <49676.41.177.16.252.1255163986.squirrel@41.177.16.252> Date: Sat, 10 Oct 2009 10:39:46 +0200 (SAST) Subject: Cannot access module members as unqualified From: rouanvd@softwarerealisations.com To: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam: no; 0.00; struct:01 endline:01 struct:01 compilation:01 ocamlc:01 ocamlc:01 cmo:01 cmo:01 unqualified:98 unqualified:98 unbound:01 compile:01 compile:01 preprocessor:01 preprocessor:01 Hi everyone. I am having trouble getting my modules to work together. I have 2 modules : ============================================ module Preprocessor = struct let run txt = print_endline txt; txt ^ txt ;; end;; module Main = struct open Preprocessor;; let main () = let text = "some text" in run text ;; end;; ============================================ I want to use the 'run' function unqualified, but i get a compilation error: Error: Unbound value run when I qualify the run function with 'Preprocessor.' it works fine, but I dont want to qualify the run function. here are the commands that I use to compile the 2 modules: ============================================ #compile the Preprocessor module & move to obj\ dir ocamlc -c Preprocessor\Preprocessor.ml move Preprocessor\*.c* build\obj\ #compile the Main module & move to obj\ dir ocamlc -I build\obj\ -c Preprocessor.cmo Main.ml move *.c* build\obj\ #link all object files to form executable ocamlc -o build\bin\c.exe build\obj\Preprocessor.cmo build\obj\Main.cmo ============================================ Regards Rouan