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.
