[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile module system problem
From: |
Panicz Maciej Godek |
Subject: |
Re: Guile module system problem |
Date: |
Wed, 21 Jan 2009 18:51:11 +0100 |
Yellu :)
>> Yet it's still not working. Now the module looks more or less
>> like this:
>> (define-module (modules goose)
>> :use-module (oop goops)
>> :replace (slot-ref))
>>
>> (define slot-ref (make-procedure-with-setter (@ (oop goops) slot-ref)
>> slot-set!))
>>
>> and the error I get when I try to use that module, is:
>> ERROR: invalid syntax #<variable 7fd6dd0ca610 value:
>> #<primitive-procedure slot-ref>>
>
> It works fine here with Guile 1.9 (`master'). I would expect it to work
> as well with 1.8. Which version are you using?
I'm using 1.8.3 (from ubuntu repository)
> Can you check whether evaluating the code above actually works
> (directly, i.e., not via `(use-modules (modules goose))')?
Yes, when I'm evaluating it directly, everything works just fine.
I've found a possible reason, though. I didn't write that in
the module definition I also use syntax from (ice-9 syncase),
so it actually looks more like this:
(define-module (modules goose)
:use-syntax (ice-9 syncase)
:use-module (oop goops)
:replace (slot-ref))
Now you should get the error right :)
(sorry for this understatement)
When I place (use-syntax (ice-9 syncase)) *after* the
slot-ref definition, it seems to work well.