chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] define-syntax available *by default*?


From: Tony Garnock-Jones
Subject: Re: [Chicken-users] define-syntax available *by default*?
Date: Thu, 04 Nov 2004 10:39:53 +0000
User-agent: Mozilla Thunderbird 0.8 (Macintosh/20040913)

Aha! That's interesting. When I adapted psyntax to my scheme->JVM compiler, I managed to get it working like your first example without too much trouble. Perhaps upgrading to a newer psyntax version would help. I'll take a look at the way it's done now and compare it to how I did it in my compiler.

Tony


felix winkelmann wrote:
There is probably no big difference. I'm just unable to figure out how
this works with psyntax. :-)

For example:

% csi
#;1> ,x (define-macro (foo) 123)
(##core#elaborationtimeonly
  (##sys#register-macro 'foo (lambda () 123)))

% csi -syntax
#;1> ,x (define-macro (foo) 123)   ; goes via define-syntax, of course
(##sys#void)

In the latter case it all happens during macro-expansion, the environment
gets augmented with a new macro-definition. In the former case the
macro-defining form expands into code that can be stuffed into a file
and compiled.




reply via email to

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