diff options
Diffstat (limited to 'src/repl.cpp')
-rw-r--r-- | src/repl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/repl.cpp b/src/repl.cpp index 4e9c44c..1169b3d 100644 --- a/src/repl.cpp +++ b/src/repl.cpp @@ -109,10 +109,19 @@ compile(CEnv& cenv, const Code& parsed, Code& defs, bool& hasMain, const char* m if (cenv.args.find("-L") != cenv.args.end()) return dump(cenv, lifted); + // Depoly all expressions + Code concrete; + for (Code::const_iterator i = lifted.begin(); i != lifted.end(); ++i) + if ((exp = resp_depoly(cenv, concrete, *i))) + concrete.push_back(exp); + if (cenv.args.find("-D") != cenv.args.end()) { + return dump(cenv, concrete); + } + // Flatten expressions const AST* retT = NULL; Code exprs; - for (Code::const_iterator i = lifted.begin(); i != lifted.end(); ++i) { + for (Code::const_iterator i = concrete.begin(); i != concrete.end(); ++i) { const ATuple* call = (*i)->to_tuple(); if (call && (is_form(*i, "def-type") || (is_form(*i, "def") && is_form(call->frrst(), "fn")))) { |