[Bese-devel] Re: compile-op error on backtracking.lisp

Marco Baringer mb at bese.it
Fri Jun 16 07:52:47 UTC 2006


Lou Vanek <vanek at acd.net> writes:

> Long answer: you can probably turn this off by setting
> *warn-undefined* to nil in start.lisp. Whenever a ucw file
> is compiled and sees "with-call/cc" a special code walker
> is invoked that parses all the code within the "with-call/cc"
> scope. Sometimes it doesn't know about variables and functions
> outside this scope and issues this warning.

exactly.

after looking into this for a bit it appears that the problem, on sbcl
at least, is this:

(defaction foo ((a bar))
   ...)

which is expanded into:

(defmethod foo ((a bar))
  (with-call/cc ...))

when sbcl compiles that defmethod form it will macro expand the body
twice, the first time around the lexical environment (the &environment
object passed to macros) will be NIL and with-call/cc won't see the
binding of A, the second time around a complete environment object is
passed and the code works (in fact the generated compiled code is
correct since sbcl throws away with-call/cc's expansion on that first
expansion) . what happens on that first expansion is that with-call/cc
signals a warning, asdf, on sbcl, treats this a compile _error_ and
breaks.

anybody with sbcl skilz able to suggest a solution?

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the bese-devel mailing list