primitive-eval takes expanded, not memoized, source
[bpt/guile.git] / libguile / expand.c
index 80bc48d..4b9f0e1 100644 (file)
@@ -1162,7 +1162,8 @@ expand_set_x (SCM expr, SCM env)
 
 \f
 
-SCM_DEFINE (scm_macroexpand, "macroexpand*", 1, 0, 0, 
+/* This is the boot expander. It is later replaced with psyntax's sc-expand. */
+SCM_DEFINE (scm_macroexpand, "macroexpand", 1, 0, 0, 
             (SCM exp),
            "Expand the expression @var{exp}.")
 #define FUNC_NAME s_scm_macroexpand
@@ -1171,6 +1172,15 @@ SCM_DEFINE (scm_macroexpand, "macroexpand*", 1, 0, 0,
 }
 #undef FUNC_NAME
 
+SCM_DEFINE (scm_macroexpanded_p, "macroexpanded?", 1, 0, 0, 
+            (SCM exp),
+           "Return @code{#t} if @var{exp} is an expanded expression.")
+#define FUNC_NAME s_scm_macroexpanded_p
+{
+  return scm_from_bool (SCM_EXPANDED_P (exp));
+}
+#undef FUNC_NAME
+
 
  \f