work on type inference some more
[ccc.git] / sem / hm / gamma.h
1 #ifndef SEM_HM_GAMMA_H
2 #define SEM_HM_GAMMA_H
3
4 #include <stdlib.h>
5
6 #include "../hm.h"
7
8 struct gamma {
9 int fresh;
10 int nschemes;
11 char **vars;
12 struct scheme **schemes;
13 };
14
15 struct gamma *gamma_init();
16 void gamma_insert(struct gamma *gamma, char *ident, struct scheme *scheme);
17
18 struct scheme *gamma_lookup(struct gamma *gamma, char *ident);
19 struct type *gamma_fresh(struct gamma *gamma);
20
21 void gamma_print(struct gamma *gamma, FILE *out);
22 void gamma_free(struct gamma *gamma);
23
24 #endif