Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Socket and Threads on windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-10 (16:24)
From: Juancarlo_Añez <juanca@s...>
Subject: OCAML Newby Question: unbound module?
I'm trying to write my first OCAML program. It will be a module that helps
handlings sets of path, like Apache Ant and WANT
( do.

Below is the first few lines of code I wrote. Whey I try to run it with
ocaml, I get:

"File "", line 1, characters 0-11:
Unbound module Dumper" and are in the same directory.

What am I doing wrong?


open Dumper;;

type fileName = string;;

type path = fileName list;;

let rec extract_file_name = function
    | ([], name)        -> ([], name)
    | ('/'::tail, name) -> (tail, name)
    | (c::tail, name)   -> extract_file_name (tail, name @ [c])

let a = extract_file_name (['a';'b';'c'], [])
  prerr_endline (Dumper.dump a);;