diff options
Diffstat (limited to 'src/cps.cpp')
-rw-r--r-- | src/cps.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cps.cpp b/src/cps.cpp index c55f728..bb375a8 100644 --- a/src/cps.cpp +++ b/src/cps.cpp @@ -63,7 +63,7 @@ cps_fn(CEnv& cenv, const ATuple* fn, const AST* cont) assert(fn->fst()); assert(copyProt.head); List copy; - copy.push_back(cenv.penv.sym("fn")); + copy.push_back(cenv.penv.sym("lambda")); copy.push_back(copyProt); for (ATuple::const_iterator i = fn->iter_at(2); i != fn->end(); ++i) @@ -105,7 +105,7 @@ cps_call(CEnv& cenv, const ATuple* call, const AST* k) std::vector<const AST*>::const_reverse_iterator a = args.rbegin(); for (ExpVec::const_reverse_iterator e = exprs.rbegin(); e != exprs.rend(); ++e, ++a) { if (!is_value(cenv, *e)) { - cont = resp_cps(cenv, *e, tup(Cursor(), cenv.penv.sym("fn"), + cont = resp_cps(cenv, *e, tup(Cursor(), cenv.penv.sym("lambda"), tup(Cursor(), *a, 0), cont, 0)); @@ -145,7 +145,7 @@ cps_if(CEnv& cenv, const ATuple* aif, const AST* k) } else { /* const ASymbol* const condSym = cenv.penv.gensym("c"); - const ATuple* contFn = tup(loc, tenv.penv.sym("fn"), + const ATuple* contFn = tup(loc, tenv.penv.sym("lambda"), tup(cond->loc, argSym, tenv.penv.gensym("_k"), 0), tup(loc, tenv.penv.sym("if"), argSym, exp->(tenv, cont), @@ -166,9 +166,9 @@ resp_cps(CEnv& cenv, const AST* ast, const AST* k) throw() if (call) { const ASymbol* const sym = call->fst()->to_symbol(); const std::string form = sym ? sym->sym() : ""; - if (form == "def") + if (form == "define") return cps_def(cenv, call, k); - else if (form == "fn") + else if (form == "lambda") return cps_fn(cenv, call, k); else if (form == "if") return cps_if(cenv, call, k); |