On 3/25/06, Sunnan <[EMAIL PROTECTED]> wrote:
>
> Since I'm sure many of you already use syntax-case together with
> tinyclos, I'm asking for some trouble-shooting tips. What am I doing
> wrong?

Adding methods to a global generic functions means taking the function
object and adding a new method to the list of already existing ones.
In the lowlevel macro system, `define-method' checks whether the toplevel
variable has a binding, and if not, installs an (empty) generic in it.
With syntax-case the situation is different. Due to peculiarities of the
module system (definitions may not be scattered through a module,
but must appear at the start, like in local/lexical `let' bodies), the
implicit definition used by `define-method' doesn't work. The syntax-case
version of `define-method' assumes a generic has already been
installed under this name, i.e. you have to do it manually, like this:

(define-generic clean)

Just put it before your first method definition.


cheers,
felix


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to