kawa-commonlisp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Kawa-commonlisp-dev] tagbodies


From: Charles Turner
Subject: Re: [Kawa-commonlisp-dev] tagbodies
Date: Fri, 27 Jul 2012 16:23:23 +0100

On 27 July 2012 13:46, Charles Turner <address@hidden> wrote:
> On 27 July 2012 13:02, Charles Turner <address@hidden> wrote:
>> On 26 July 2012 21:12, Jamison Hope <address@hidden> wrote:
>>> LABELS is very similar to Scheme's letrec, so I would expect the
>>> amount of work to get a working LABELS to be about what you had to do to
>>> make FLET based on LET (i.e. not too much).
>>
>> Maybe I should just copy the thing in my primitives file and somehow modify 
>> it
>> to to call this method?
>
> Or better just call FLET instead of %let...

I'm struggling to get this working.

I won't quote LETREC, as it's quite large, it can be found in
kawa/lib/prim_syntax.scm

My first idea was to replace (process-binding ..) with (funcall
process-binding ...) in the macro. However, line 122 (of prim_syntax
when replaced like this) throws a (paraphrased)
APPLY - wrong type (kawa.lang.SyntaxForms$SimpleSyntaxForm cannot be
cast to gnu.mapping.procedure) because of the (syntax bindings) bit.
(My FUNCALL is implementing in terms of APPLY).

The next attempt was to use FLET instead. (flet ((process-binding ()
#undefined)) (set! process-binding (lambda (b) ...)) ...). That didn't
work, process-binding just returns #!undefined... Seemed a bit wacky
anyway. I naively thought I could call settingProcedureDecls on
process-binding, but it's compiled into a ModuleMethod so I can't do
that. Am I missing something obvious?

Charles.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]