summaryrefslogtreecommitdiff
path: root/libguile/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/eval.c')
-rw-r--r--libguile/eval.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libguile/eval.c b/libguile/eval.c
index 63808c62d..752ba2ca5 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -37,6 +37,7 @@
#include "libguile/deprecation.h"
#include "libguile/dynwind.h"
#include "libguile/eq.h"
+#include "libguile/expand.h"
#include "libguile/feature.h"
#include "libguile/fluids.h"
#include "libguile/goops.h"
@@ -832,13 +833,9 @@ scm_for_each (SCM proc, SCM arg1, SCM args)
static SCM
scm_c_primitive_eval (SCM exp)
{
- if (!SCM_MEMOIZED_P (exp))
+ if (!SCM_EXPANDED_P (exp))
exp = scm_call_1 (scm_current_module_transformer (), exp);
- if (!SCM_MEMOIZED_P (exp))
- scm_misc_error ("primitive-eval",
- "expander did not return a memoized expression",
- scm_list_1 (exp));
- return eval (exp, SCM_EOL);
+ return eval (scm_memoize_expression (exp), SCM_EOL);
}
static SCM var_primitive_eval;