bug-guile
[Top][All Lists]
Advanced

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

`set!' of generated temporary in macro expansion causes warning


From: Andreas Rottmann
Subject: `set!' of generated temporary in macro expansion causes warning
Date: Mon, 13 Jun 2011 12:10:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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/>



reply via email to

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