I narrowed down an issue I'd hit to this:

  ;; somefile.scm
  (define-syntax foo
    (syntax-rules ()
      ((_ any ...) (letrec ((x y) (y 'foo)) x))))

  (eval-when (expand load eval) (foo 1))

Which produces this with 2.2.4 and 2.2.6:

  $ guile -s somefile.scm
  [...]
  Backtrace:
             7 (primitive-load "/home/rlb/src/lokke/standalone/ele.scm")
  In ice-9/eval.scm:
     721:20  6 (primitive-eval (eval-when (expand load eval) (foo 1)))
  In ice-9/psyntax.scm:
    1235:36  5 (expand-top-sequence ((eval-when (expand load eval) #)) …)
    1182:24  4 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
     285:10  3 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
  In ice-9/eval.scm:
      619:8  2 (_ #(#<directory (guile-user) 55e5e3a3b140> #<variab…> …))
     298:34  1 (_ #(#<directory (guile-user) 55e5e3a3b140> #<variab…> …))
      227:9  0 (_ _)

  ice-9/eval.scm:227:9: Unbound variable: #<variable 55e5e3924d60 value: 
#<undefined>>

but works fine without the eval-when, and I wondered if that was
expected.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Reply via email to