unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* `set!' of generated temporary in macro expansion causes warning
@ 2011-06-13 10:10 Andreas Rottmann
       [not found] ` <BANLkTin87s-9YKi+LyAmH+2=HGVYq7nFKQ@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Rottmann @ 2011-06-13 10:10 UTC (permalink / raw)
  To: Guile Bugs

Hi!

This is a much-stripped-down version of a `define-values' macro,
exposing what seems like a psyntax bug:

% cat guile-psyntax-temp-set-issue.scm 
(define-syntax define+set!
  (lambda (form)
    (syntax-case form ()
      ((_)
       (with-syntax (((mutable-id) (generate-temporaries '(id))))
         #'(begin
             (define mutable-id #f)
             (set! mutable-id #t)))))))

(define+set!)

% guile guile-psyntax-temp-set-issue.scm                  
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/rotty/tmp/guile-psyntax-temp-set-issue.scm

;;; WARNING (module system is booted, we should have a module #{ g65}#)
;;; compiled /home/rotty/.cache/guile/ccache/2.0-LE-8-2.0/home/rotty/tmp/guile-psyntax-temp-set-issue.scm.go

Note the WARNING line; it seems during expansion something goes wrong
wrt. to modules -- it'd be really nice if some psyntax guru can have a
look at this.

Regards, Rotty
-- 
Andreas Rottmann -- <http://rotty.yi.org/>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-30 18:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13 10:10 `set!' of generated temporary in macro expansion causes warning Andreas Rottmann
     [not found] ` <BANLkTin87s-9YKi+LyAmH+2=HGVYq7nFKQ@mail.gmail.com>
2011-06-13 12:10   ` Andreas Rottmann
     [not found]     ` <BANLkTimgdKtNFf8xj7DTUpSLmbQZtQZ0Xw@mail.gmail.com>
2011-06-13 13:25       ` Andreas Rottmann
2011-06-17  8:48     ` Andy Wingo
2011-06-30 17:35       ` Mark H Weaver
2011-06-30 18:12         ` Andy Wingo
2011-06-13 13:50   ` Fwd: " Stefan Israelsson Tampe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).