chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] compiler bug at macro-expand time?


From: Bruce Hoult
Subject: [Chicken-users] compiler bug at macro-expand time?
Date: 06 Jul 2003 18:49:04 +1200

I'm having a problem compiling some code that allegedly worked in
Chicken around 9 or 10 months ago.

I've reduced it to the following test case.
-------------------------------------------------------
; uncomment one of the following three lines
;(declare (uses srfi-13))
;(define (string-downcase s) "foo")
;(define-macro (string-downcase s) "foo")

(define-macro (down-and-print s)
  `(print ,(string-downcase s)))

(down-and-print "This is a TEST")
-------------------------------------------------------

The result of compiling with either of the first two lines above
uncommented is:

Error: during expansion of (down-and-print ...) - unbound variable:
string-downcase

Strangely, if string-downcase is itself a macro it works.

The name "string-downcase" is not essential to the problem, except that
I'm expecting to pick it up from srfi-13 (in fact it works properly if I
use it in normal code, or if the macro expands into a call to it).

It appears that the name is only not found during macro expansion time.

-- 
Bruce Hoult <address@hidden>





reply via email to

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