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: Garry Hodgson <garry@s...>
Subject: [Caml-list] what does this mean?

i'm getting en error message i don't understand in the following code
fragment. is:

let regions = Hashtbl.create 64

type location = { name:string; mutable nodes:string list }
type region = { name:string; coords:(int*int*int*int); countries:string
list }

let addRegion name0 coords0 ccs =
	let r = { name=name0; coords=coords0; countries=ccs } in
	Hashtbl.add regions name0 r

when i comp[ile, i get:

$ ocamlc
File "", line 9, characters 13-20:
This expression has type ('a, 'b) Hashtbl.t but is here used with type
  (string, region) Hashtbl.t
The type constructor region would escape its scope

can someone explain what this means, and perhaps how to resolve it?

Garry Hodgson                   Let my inspiration flow
Senior Hacker                      in token rhyme suggesting rhythm
Software Innovation Services    that will not forsake me
AT&T Labs                          'til my tale is told and done.
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: