This is the mail archive of the mailing list for the guile project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: `undefine' bug or feature?

> tructure of l.  To undefine some random variable, you have to run
> around all the Scheme code in the system unmemoizing it.

well, I think one has to check every SCM_GLOC_SYM against SCM_UNDEFINED
and issue an error if the symbol is undefined. 
Something like:

scm_misc_error (0, "Unbound variable: %S", scm_listify (SCM_CAR (x-1L)))

Unfortunately eval.c is the plain horror:

#define EVALCAR(x, env) (SCM_NCELLP(SCM_CAR(x))\
			? (SCM_IMP(SCM_CAR(x)) \
			   ? EVALIM(SCM_CAR(x), env) \
			   : SCM_GLOC_VAL(SCM_CAR(x))) \

And look at this:

/* At this point, scm_deval and scm_dapply are generated.

# define DEVAL
# include "eval.c"

eval.c includes itself! :(

Do you think it is okay to change EVALCAR, XEVALCAR and SCM_GLOC*
from macros into functions?