From: Borislav I. <bor...@ko...> - 2004-03-22 15:58:18
|
Hi all, I have a problem getting macros to work. As I understand, I need to load the following two files: elf/eopl2/jscheme/genwrite.scm elf/eopl2/jscheme/psyntax-init.scm I do that and then try something simple like: (define-syntax swap (syntax-rules () ((swap a b) (let ((tmp b)) (set! b a) (set! a tmp))))) Evaluating the last expression tells me "undefined variable 'define-syntax'". I also tried loading a the OO style code using/friedman-init.scm which makes heavy use of macros and I get an error saying that 'pretty-print' is not defined. This is with the latest code from CVS, patched not to set the current thread's classloader to Import.CLASSLOADER. I am quite a beginner in Scheme and I've never used macros, so the problem may be a really straightforward misunderstanding on my part. Thanks, Boris |