#ifndef HASH_H
#define HASH_H
+#include "BeginPrivate.h"
+
typedef struct hashtable HashTable; /* abstract */
/* Hash table access where the keys are StgWords */
#define removeStrHashTable(table, key, data) \
(removeHashTable(table, (StgWord)key, data))
+/* Hash tables for arbitrary keys */
+typedef int HashFunction(HashTable *table, StgWord key);
+typedef int CompareFunction(StgWord key1, StgWord key2);
+HashTable * allocHashTable_(HashFunction *hash, CompareFunction *compare);
+int hashWord(HashTable *table, StgWord key);
+int hashStr(HashTable *table, char *key);
+
/* Freeing hash tables
*/
void freeHashTable ( HashTable *table, void (*freeDataFun)(void *) );
+void exitHashTable ( void );
+
+#include "EndPrivate.h"
+
#endif /* HASH_H */