[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] import, the utf8 egg, syntax-case and tinyclos
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] import, the utf8 egg, syntax-case and tinyclos |
Date: |
Sat, 25 Mar 2006 17:03:12 +0100 |
On 3/25/06, Sunnan <address@hidden> 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] import, the utf8 egg, syntax-case and tinyclos, Sunnan, 2006/03/23
- Re: [Chicken-users] import, the utf8 egg, syntax-case and tinyclos, Sunnan, 2006/03/23
- Re: [Chicken-users] import, the utf8 egg, syntax-case and tinyclos, felix winkelmann, 2006/03/24
- Re: [Chicken-users] import, the utf8 egg, syntax-case and tinyclos, Sunnan, 2006/03/27
- Re: [Chicken-users] import, the utf8 egg, syntax-case and tinyclos,
felix winkelmann <=
- Re: [Chicken-users] import, the utf8 egg, syntax-case and tinyclos, Sunnan, 2006/03/25