caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Error: Type variables, that can not be generalized?!
@ 2003-02-20 19:50 Oliver Bandel
  2003-02-20 19:54 ` Basile STARYNKEVITCH
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Bandel @ 2003-02-20 19:50 UTC (permalink / raw)
  To: caml-list

Hello,


I'm teseting my code in the toplevel, and see no problems.
I use the ocamlc-compiler and it produces this message:


  "The type of this expression, ('_a, `_b) Hashtbl.t,
   contains type variables that cannot be generalized"

The line, where the problem occured was an unused
Hashtable-Creation.

When I removed that line, or when I added a Hashtbl.add,
the message disappeared.

Why is this a problem?

The line was:
  let entry_hash = Hashtbl.create 100000

The added line, which lets the error-message disappears
was:

   Hashtbl.add entry_hash "foo" "bar"


Any hints, ewhat the problem is?


Regards,
   Oliver
-------------------
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


^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [Caml-list] Error: Type variables, that can not be generalized?!
@ 2003-02-21  0:23 Arturo Borquez
  0 siblings, 0 replies; 5+ messages in thread
From: Arturo Borquez @ 2003-02-21  0:23 UTC (permalink / raw)
  To: Oliver Bandel; +Cc: caml-list

oliver@first.in-berlin.de (Oliver Bandel) wrote:

Easy, when you add to the code the line adding an element
to the hash table you've also tell to the type system that
the hash table had a concrete type. Same problem will be
raised with an empty list [] wich is never used.

Regards

Arturo 

>Hello,
>
>
>I'm teseting my code in the toplevel, and see no problems.
>I use the ocamlc-compiler and it produces this message:
>
>
>  "The type of this expression, ('_a, `_b) Hashtbl.t,
>   contains type variables that cannot be generalized"
>
>The line, where the problem occured was an unused
>Hashtable-Creation.
>
>When I removed that line, or when I added a Hashtbl.add,
>the message disappeared.
>
>Why is this a problem?
>
>The line was:
>  let entry_hash = Hashtbl.create 100000
>
>The added line, which lets the error-message disappears
>was:
>
>   Hashtbl.add entry_hash "foo" "bar"
>
>
>Any hints, ewhat the problem is?
>
>
>Regards,
>   Oliver
>-------------------
>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
>


-- 
Arturo Borquez


__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-21 16:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-20 19:50 [Caml-list] Error: Type variables, that can not be generalized?! Oliver Bandel
2003-02-20 19:54 ` Basile STARYNKEVITCH
2003-02-21  3:30   ` John Max Skaller
2003-02-21 16:20     ` Gérard Huet
2003-02-21  0:23 Arturo Borquez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).