summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-11-20 21:05:01 +0100
committertomsmeding <tom.smeding@gmail.com>2016-11-20 21:05:01 +0100
commit979325946b938be7cbe51f8c20c44e457107979f (patch)
treef6814eb3af59fea8d2f8fe25117a1c88557ae474 /ast.h
parent834cb55baadb9dd7c3a4ad096d81259d0868eeb9 (diff)
Sugar and prelude extension
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index c0b0d90..700fc80 100644
--- a/ast.h
+++ b/ast.h
@@ -1,5 +1,6 @@
#pragma once
+#include <functional>
#include <iostream>
#include <string>
#include <vector>
@@ -82,4 +83,13 @@ public:
static AST makeNative(const Native &native);
};
+namespace std {
+ template <>
+ struct hash<AST::Type>{
+ size_t operator()(const AST::Type &type) const {
+ return (size_t)type;
+ }
+ };
+}
+
ostream& operator<<(ostream &os,const AST &ast);