----- Original Message -----
From: "Michele Simionato" <[email protected]>
To: <[email protected]>
Sent: Sunday, April 26, 2009 8:43 AM
Subject: [ikarus-users] puzzled by separate compilation
There is no end to my questions. Today I defined the following macro:
;; uses srfi-19
(def-syntax (compilation-time)
(let ((isodate (date->string (current-date) "~5")))
(display "Compilation time: ") (display isodate) (newline)
isodate))
I put this in a module and I compiled it separately.
During compilation I got the message
Compilation time: 2009-04-26T07:29:55
printed, as I was expecting.
Then, I run a script importing the already compiled module
and using the compilation-time macro.
I expected to see printed the time I first compiled the macro.
Instead, I got a new time.
It looks like the script is executing the right hand side
of the macro definition again, i.e. recompiling the macro
each time I am running it. Is that correct?
I am puzzled ...
I think you need to use: make-compile-time-value
I have never known what to do with it, but this look like an oppertunity. :)
I think you probably need more than 1 macro too.
Cheers
leppie