[plt-scheme] Non-syntax-rules macros in scheme/base
On Sat, Oct 11, 2008 at 10:00 PM, Henk Boom <lunarc.lists at gmail.com> wrote:
> 2008/10/11 Carl Eastlund <cce at ccs.neu.edu>:
>> #lang scheme/base
>> ;; You need to add the following line:
>> (require (for-syntax scheme/base))
>>
>> (provide test)
>>
>> (define-syntax test
>> (lambda (stx)
>> #'2))
>>
>
> Thank you!
>
> Is this because #lang scheme automatically does the require-for-syntax?
Yep. I believe it requires all its bindings into both normal and
transformer environments. Whereas scheme/base is built for quicker
compiling and fewer dependencies, so it doesn't put anything into the
transformer environment.
--
Carl Eastlund