chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] macroexpansion and csc


From: Lui Fungsin
Subject: Re: [Chicken-users] macroexpansion and csc
Date: Fri, 21 Mar 2008 12:51:22 -0700

On 3/21/08, John Cowan <address@hidden> wrote:
> > ;; test1.scm
> > (declare (uses srfi-13))
> >
> > (eval-when (compile load eval)
> >   (require-extension srfi-13))
>
> Instead of this, try (use srfi-13), which is supposed to handle all
> such problems.

Thanks for the suggestion, although I don't really understand what's
the difference between those declarations.

Unfortunately, this still fails.


;;  test1.scm

(use srfi-13)

; (declare (uses srfi-13))

; (eval-when (compile load eval)
;   (require-extension srfi-13))

(define-macro (dc stuff)
  (string-downcase stuff))

(print (dc "ABC"))

% csc test1.scm
Error: during expansion of (dc ...) - unbound variable: string-downcase

Call history:

<syntax> (begin (print (dc "ABC")))
<syntax> (print (dc "ABC"))
<syntax> (dc "ABC")
<eval> (string-downcase stuff) <--
*** Shell command terminated with exit status 1:
/usr/local/bin/chicken test1.scm -output-file test1.c -quiet


% csc -R srfi-13 test1.scm
Error: during expansion of (dc ...) - unbound variable: string-downcase

Call history:

<syntax> (begin (print (dc "ABC")))
<syntax> (print (dc "ABC"))
<syntax> (dc "ABC")
<eval> (string-downcase stuff) <--
*** Shell command terminated with exit status 1:
/usr/local/bin/chicken test1.scm -output-file test1.c -quiet
-require-extension srfi-13




reply via email to

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