Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
(http://www.suigeneris.org/want) do.

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

"File "pattensets.ml", line 1, characters 0-11:
Unbound module Dumper"

Dumper.mil and dumper.ml are in the same directory.

What am I doing wrong?

--
Juanco
---

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'], [])
in
  prerr_endline (Dumper.dump a);;