Subject: bug#10991: closed (Re: bug#10991: syntax-local-binding does not play well with fluid-let-syntax)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 13 Mar 2013 10:46:02 +0000

Your bug report

#10991: syntax-local-binding does not play well with fluid-let-syntax

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
10991: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10991
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#10991: syntax-local-binding does not play well with fluid-let-syntax
From: Andy Wingo <[email-masked]>
To: Stefan Israelsson Tampe <[email-masked]>
Cc: [email-masked]
Date: Wed, 13 Mar 2013 11:44:36 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sun 23 Sep 2012 12:22, Stefan Israelsson Tampe <[email-masked]> writes:

> What's perhaps is missing is a simple change to local-syntax-value to
> add a keyword so that one can decide if one wants the definition value
> of the syntax parameter.

I have added this in master (to syntax-local-binding) and documented
it.  Closing this bug.

Andy
-- 
http://wingolog.org/

Subject: syntax-local-binding does not play well with fluid-let-syntax
From: Stefan Israelsson Tampe <[email-masked]>
To: [email-masked]
Date: Sun, 11 Mar 2012 12:47:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

loading local-stx shows that setting a macro via fluid-let-syntax does not
play well with syntax-local-binding who just sees the outside main
definition and not the newly introduced binding!
 -------------------

(use-modules (system syntax))
(use-modules (srfi srfi-11))

(eval-when (compile load eval)
  (define (%f x) (error "this macro should never be called")))

(define-syntax f %f)

(define-syntax info
  (lambda (x)
    (syntax-case x ()
      ((_ f)
       (let-values (((key ret) (syntax-local-binding #'f)))
         (pk key)
         ret)))))

;;This shows that f rebounds to yield #t but the info returns %f
(eq?
 (fluid-let-syntax ((f (lambda x #'#t)))
   (pk (f 1))
   (info f))
 %f)