work on type inference some more
[ccc.git] / sem / hm / gamma.h
diff --git a/sem/hm/gamma.h b/sem/hm/gamma.h
new file mode 100644 (file)
index 0000000..8499144
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef SEM_HM_GAMMA_H
+#define SEM_HM_GAMMA_H
+
+#include <stdlib.h>
+
+#include "../hm.h"
+
+struct gamma {
+       int fresh;
+       int nschemes;
+       char **vars;
+       struct scheme **schemes;
+};
+
+struct gamma *gamma_init();
+void gamma_insert(struct gamma *gamma, char *ident, struct scheme *scheme);
+
+struct scheme *gamma_lookup(struct gamma *gamma, char *ident);
+struct type *gamma_fresh(struct gamma *gamma);
+
+void gamma_print(struct gamma *gamma, FILE *out);
+void gamma_free(struct gamma *gamma);
+
+#endif