aboutsummaryrefslogtreecommitdiffstats
path: root/src/repl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/repl.cpp')
-rw-r--r--src/repl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repl.cpp b/src/repl.cpp
index 923c26d..15e263f 100644
--- a/src/repl.cpp
+++ b/src/repl.cpp
@@ -114,9 +114,9 @@ eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute)
// Compile top-level (lifted) functions
Code exprs;
for (Code::const_iterator i = lifted.begin(); i != lifted.end(); ++i) {
- const ADef* def = (*i)->to<const ADef*>();
- if (def && def->list_ref(2)->to<const AFn*>()) {
- val = resp_compile(cenv, def);
+ const ACall* call = (*i)->to<const ACall*>();
+ if (call && is_form(call, "def") && is_form(call->list_ref(2), "fn")) {
+ val = resp_compile(cenv, call);
} else {
assert(*i);
ATuple* tup = (*i)->to<ATuple*>();