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
[Caml-list] what does this mean?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas barnier <barnier@r...>
Subject: Re: [Caml-list] what does this mean?
Garry Hodgson wrote:
> no, i hadn't thought of that.  works fine now.  thanks!

After thinking about it, I figured out a better explanation for
this restriction. Suppose you have the following code:

let h = Hashtbl.create 10

module M = (struct
  type t = A
  let _ = Hashtbl.add h 0 A
end : sig end)

let t = Hashtbl.get h 0

then type t would be visible outside M, whereas module M,
restricted by its signature, does not export it. I think this
is the meaning of the error message: "The type constructor t
would escape its scope". So it rather is a safe restriction.


-- Nicolas
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: