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.8 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 2D07BBBAF for ; Sat, 10 Oct 2009 16:43:07 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApADAI860EpQRFuwWWdsb2JhbACbAgEWFQS8foQtBA X-IronPort-AV: E=Sophos;i="4.44,537,1249250400"; d="scan'208";a="37977829" Received: from furbychan.cocan.org ([80.68.91.176]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Oct 2009 16:43:06 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1Mwd9y-0008Kr-Tx; Sat, 10 Oct 2009 15:43:02 +0100 Date: Sat, 10 Oct 2009 15:43:02 +0100 To: rouanvd@softwarerealisations.com Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Cannot access module members as unqualified Message-ID: <20091010144302.GA31634@annexia.org> References: <49676.41.177.16.252.1255163986.squirrel@41.177.16.252> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49676.41.177.16.252.1255163986.squirrel@41.177.16.252> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; 0200,:01 struct:01 endline:01 ocamlc:01 struct:01 ocaml:01 unqualified:98 10,:98 2009:98 wrote:01 preprocessor:01 preprocessor:01 defines:01 caml-list:01 module:03 On Sat, Oct 10, 2009 at 10:39:46AM +0200, rouanvd@softwarerealisations.com wrote: > ============================================ > module Preprocessor = > struct > > let run txt = > print_endline txt; > txt ^ txt ;; > > end;; [...] > ocamlc -c Preprocessor\Preprocessor.ml The problem you have is the above code defines a module called Preprocessor.Preprocessor. Omit all the [module ... = struct] and [end;;] parts, and it will work fine. http://ocaml-tutorial.org/the_structure_of_ocaml_programs Rich. -- Richard Jones Red Hat