update submodules for GHC.HetMet.GArrow -> Control.GArrow renaming
[ghc-hetmet.git] / rts / Hash.h
index ad55953..727c042 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef HASH_H
 #define HASH_H
 
+#include "BeginPrivate.h"
+
 typedef struct hashtable HashTable; /* abstract */
 
 /* Hash table access where the keys are StgWords */
@@ -32,9 +34,20 @@ HashTable * allocStrHashTable ( void );
 #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 */