aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tuplr.cpp')
-rw-r--r--tuplr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tuplr.cpp b/tuplr.cpp
index 580416c..0200a36 100644
--- a/tuplr.cpp
+++ b/tuplr.cpp
@@ -100,6 +100,11 @@ readExpression(Cursor& cur, std::istream& in)
void
initLang(PEnv& penv, TEnv& tenv)
{
+ // Types
+ tenv.def(penv.sym("Bool"), new AType(penv.sym("Bool")));
+ tenv.def(penv.sym("Int"), new AType(penv.sym("Int")));
+ tenv.def(penv.sym("Float"), new AType(penv.sym("Float")));
+
// Literals
static bool trueVal = true;
static bool falseVal = false;
@@ -155,7 +160,6 @@ main(int argc, char** argv)
{
PEnv penv;
TEnv tenv(penv);
- initTypes(penv, tenv);
initLang(penv, tenv);
CEnv* cenv = newCenv(penv, tenv);