[Haskell-cafe] Simple hash table creation

Daniel Fischer daniel.is.fischer at web.de
Tue Nov 17 14:45:10 EST 2009

Am Dienstag 17 November 2009 20:36:46 schrieb Daniel Fischer:
> What you probably wanted was
> type MyHashTable = HashTable String Int -- not data MyHashTable

Just in case it's not clear:

> ht <- new (==) dummy :: IO MyHashTable

only works at the prompt or in an IO do-block, not at the top level of the module.

> then ht is a hashtable of type MyHashTable.

More information about the Haskell-Cafe mailing list