[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Goops, set! and define-syntax throuble
From: |
Ingo Ruhnke |
Subject: |
Goops, set! and define-syntax throuble |
Date: |
06 Mar 2001 22:04:12 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Hi,
I have a problem with using set! on a goops object inside a macro
which was defined with define-syntax/syntax-rules, the following
example demonstrate it:
-------------------------- snip --------------------------
(use-modules (ice-9 syncase))
(use-modules (oop goops))
;; TimeManager, timed
(define-syntax my-begin
(syntax-rules ()
((_ rest ...)
((lambda () rest ...)))))
(define-class <bla> ()
(somevar #:accessor somevar
#:setter set-somevar))
(define a 2)
(define b (make <bla>))
(my-begin
(set! a 5)
(set! (somevar b) 5) ;; <- this line is causing throuble
(set-somevar b 5))
-------------------------- snip --------------------------
When I try to run it I get the following error message:
,----
| /usr/share/guile/1.3.4/ice-9/syncase.scm:88:16: In procedure scm-error in
expression (scm-error (quote misc-error) who ...):
| /usr/share/guile/1.3.4/ice-9/syncase.scm:88:16: invalid syntax (set! (somevar
b) 5)
`----
If I move "(set! (somevar b) 5)" outsite of my-begin it works, if I
use set-somevar instead it also works, only when using set! inside
my-begin it fails. Anybody knows what is going on here?
I am using Goops 0.1.6 and Guile 1.3.4 here.
--
ICQ: 59461927 http://www.pingus.cx |
Ingo Ruhnke <address@hidden> http://pingus.seul.org/~grumbel/ |
------------------------------------------------------------------------'
- Goops, set! and define-syntax throuble,
Ingo Ruhnke <=
- Re: Goops, set! and define-syntax throuble, Martin Grabmueller, 2001/03/07
- Re: Goops, set! and define-syntax throuble, Mikael Djurfeldt, 2001/03/07
- Re: Goops, set! and define-syntax throuble, Keith Wright, 2001/03/08
- Re: Goops, set! and define-syntax throuble, Mikael Djurfeldt, 2001/03/08
- Re: Goops, set! and define-syntax throuble, Marius Vollmer, 2001/03/08
- Re: Goops, set! and define-syntax throuble, Mikael Djurfeldt, 2001/03/08
- Re: Goops, set! and define-syntax throuble, Keith Wright, 2001/03/09
- Re: Goops, set! and define-syntax throuble, Dirk Herrmann, 2001/03/10
- Re: Goops, set! and define-syntax throuble, Keith Wright, 2001/03/11