aboutsummaryrefslogtreecommitdiffstats
path: root/src/lift.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lift.cpp')
-rw-r--r--src/lift.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/lift.cpp b/src/lift.cpp
index 71843b5..1e115cf 100644
--- a/src/lift.cpp
+++ b/src/lift.cpp
@@ -183,36 +183,6 @@ lift_fn(CEnv& cenv, Code& code, const ATuple* fn) throw()
}
static const AST*
-lift_let(CEnv& cenv, Code& code, const ATuple* let) throw()
-{
- const ATuple* vars = let->list_ref(1)->to_tuple();
-
- List<ATuple, const AST> copy(let->loc, let->head(), NULL);
- List<ATuple, const AST> copyVars;
-
- cenv.push();
-
- for (ATuple::const_iterator i = vars->begin(); i != vars->end();) {
- const ASymbol* sym = (*i++)->to_symbol();
- const AST* val = (*i++);
- cenv.def(sym, val, cenv.type(val), NULL);
- copyVars.push_back(sym);
- copyVars.push_back(val);
- resp_lift(cenv, code, val);
- }
- copy.push_back(copyVars);
-
- for (ATuple::const_iterator i = let->iter_at(2); i != let->end(); ++i)
- copy.push_back(resp_lift(cenv, code, *i));
-
- cenv.pop();
-
- cenv.setTypeSameAs(copy, let);
-
- return copy;
-}
-
-static const AST*
lift_call(CEnv& cenv, Code& code, const ATuple* call) throw()
{
List<ATuple, const AST> copy;
@@ -295,12 +265,12 @@ resp_lift(CEnv& cenv, Code& code, const AST* ast) throw()
return lift_def(cenv, code, call);
else if (form == "def-type")
return call;
+ else if (form == "do")
+ return lift_args(cenv, code, call);
else if (form == "fn")
return lift_fn(cenv, code, call);
else if (form == "if")
return lift_args(cenv, code, call);
- else if (form == "let")
- return lift_let(cenv, code, call);
else if (form == "__tag_is")
return call;
else