Version française
Home     About     Download     Resources     Contact us    
Browse thread
Cannot access module members as unqualified
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Cannot access module members as unqualified
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