Version française
Home     About     Download     Resources     Contact us    
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.  foo.ml 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 foo.ml
File "foo.ml", 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?
thanks

-- 
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.
garry@sage.att.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners