English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
RE: [Caml-list] Error: Type variables, that can not be generalized?!
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-02-21 (00:24)
From: artboreb@n...
Subject: RE: [Caml-list] Error: Type variables, that can not be generalized?!
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.



>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
>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
>   Hashtbl.add entry_hash "foo" "bar"
>Any hints, ewhat the problem is?
>   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