chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] compile-time eval-time mismatch


From: Michele Simionato
Subject: [Chicken-users] compile-time eval-time mismatch
Date: Wed, 8 Dec 2004 03:54:26 -0500

I cannot get this code to work properly with the compiler:

$ cat example.scm
(eval-when
 (compile eval)
 
 (define (chatty ls)
   (print "macro called with args " ls)
   ls))

(define-macro (mac . args)
  (chatty
  `(chatty ',args)))

(print (mac 1 2))

It works fine in the interpreter,

$ csi -script example.scm
macro called with args (chatty (quote (1 2)))
macro called with args (1 2)
(1 2)

it compiles as I expect

$ csc example.scm
macro called with args (chatty (quote (1 2)))

but the executable gives me a runtime error:

$ example
Error: unbound variable: chatty

helper-functions.scm: 14   chatty

I cannot figure out an eval-when combination such to solve the issue :-(


      Michele Simionato




reply via email to

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