start with type inference
[ccc.git] / sem / hm.h
diff --git a/sem/hm.h b/sem/hm.h
new file mode 100644 (file)
index 0000000..efb1afa
--- /dev/null
+++ b/sem/hm.h
@@ -0,0 +1,20 @@
+#ifndef SEM_HM_C
+#define SEM_HM_C
+
+#include "../ast.h"
+
+struct scheme {
+       struct type *type;
+       int nvar;
+       char **var;
+};
+
+struct substitution {
+       int nvar;
+       char **vars;
+       struct type **types;
+};
+
+struct ast *infer(struct ast *ast);
+
+#endif