aboutsummaryrefslogtreecommitdiffstats
path: root/src/constrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/constrain.cpp')
-rw-r--r--src/constrain.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp
index 0581115..87cc698 100644
--- a/src/constrain.cpp
+++ b/src/constrain.cpp
@@ -22,6 +22,17 @@
#include <set>
#include "tuplr.hpp"
+#define CONSTRAIN_LITERAL(CT, NAME) \
+template<> void \
+ALiteral<CT>::constrain(TEnv& tenv, Constraints& c) const { \
+ c.constrain(tenv, this, tenv.named(NAME)); \
+}
+
+// Literal template instantiations
+CONSTRAIN_LITERAL(int32_t, "Int")
+CONSTRAIN_LITERAL(float, "Float")
+CONSTRAIN_LITERAL(bool, "Bool")
+
void
AString::constrain(TEnv& tenv, Constraints& c) const
{