Subject: patch and fixed test

From: Stefan Israelsson Tampe <[email-masked]>
Date: Sun, 18 Mar 2012 22:11:33 +0100

Racket has two versions of syntax-local-binding, one that does lookup of
syntax parameters and one that don't. So it would be interesting to know
why.

Anyway with this mail, there is a patch that enable syntax-local-value to
lookup syntax-parameters
as well.

Also let's fix the test. With the definitions as in the previous mail use
in stead,

(define-syntax info
  (lambda (x)
    (syntax-case x ()
      ((_ f)
        (let-values (((key ret) (syntax-local-binding #'f)))
          (datum->syntax x (eq? ret %f)))))))

and
(info f)                                                       => #t
(fluid-let-syntax ((f (lambda x #'#t))) (info f))  =>  #f
From 847991d6424ab99009a632bf7561392c52e7704d Mon Sep 17 00:00:00 2001
From: Stefan Israelsson Tampe <[email-masked]>
Date: Sun, 18 Mar 2012 22:08:39 +0100
Subject: [PATCH] module/ice-9/psyntax.scm (resolve-identifier): enable
 syntax-local-value to lookup syntax-parameters.

---
 module/ice-9/psyntax.scm |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index 6015eff..4f71764 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -843,6 +843,13 @@
           (values (binding-type b) (binding-value b) mod)))
       (let ((n (id-var-name id w)))
         (cond
+         ((assq n r) => (lambda (pb) 
+                          (let ((b (cdr pb)))
+                            (values (binding-type  b)
+                                    (binding-value b)
+                                    (if (syntax-object? id)
+                                        (syntax-object-module id)
+                                        mod)))))
          ((symbol? n)
           (resolve-global n (if (syntax-object? id)
                                 (syntax-object-module id)
-- 
1.7.9