bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #35526] Nested macro


From: Helmut Eller
Subject: [Bug-kawa] [bug #35526] Nested macro
Date: Tue, 14 Feb 2012 10:37:10 +0000
User-agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.229 Version/11.61

URL:
  <http://savannah.gnu.org/bugs/?35526>

                 Summary: Nested macro
                 Project: Kawa
            Submitted by: ellerh
            Submitted on: Tue 14 Feb 2012 10:37:09 AM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

This code

(define-syntax (foo form)
  (syntax-case form ()
    ((foo-id stuff ...)
     (with-syntax ((bar-id (datum->syntax (syntax foo-id) 'bar)))
       (syntax
        (let ((f (lambda () (display "bar\n"))))
           (let-syntax ((bar-id (syntax-rules ()
                                  ((bar-id) (f)))))
             (begin stuff ...))))))))

(define (baz)
  (foo (bar) (bar)))

(baz)

should print bar two times but produces this error:


x.scm:13:8: warning - no declaration seen for f
x.scm:13:14: warning - no declaration seen for f
x.scm:13:8: unbound location f
        at gnu.mapping.Location.get(Location.java:67)
        at x.baz(x.scm:13)
        at x.apply0(x.scm:12)
        at gnu.expr.ModuleMethod.apply0(ModuleMethod.java:186)
        at gnu.expr.ModuleMethod.apply(ModuleMethod.java:160)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
        at x.run(x.scm:15)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:299)
        at gnu.expr.CompiledModule.evalModule(CompiledModule.java:41)
        at gnu.expr.CompiledModule.evalModule(CompiledModule.java:60)
        at kawa.Shell.runFile(Shell.java:510)
        at kawa.Shell.runFileOrClass(Shell.java:426)
        at kawa.repl.main(repl.java:873)







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35526>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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