diff --git a/src/ikarus.boot b/src/ikarus.boot index 6999b0b..e7ad493 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.syntax.ss b/src/ikarus.syntax.ss index e59f9c6..9f8568e 100644 --- a/src/ikarus.syntax.ss +++ b/src/ikarus.syntax.ss @@ -8,7 +8,8 @@ (library (ikarus syntax) (export identifier? syntax-dispatch environment environment? eval generate-temporaries free-identifier=? - bound-identifier=? syntax-error + bound-identifier=? syntax-error datum->syntax + syntax->datum eval-r6rs-top-level boot-library-expand eval-top-level) (import (r6rs) @@ -2276,6 +2277,14 @@ (apply string-append args) (strip x '())))) (define identifier? (lambda (x) (id? x))) + (define datum->syntax + (lambda (id datum) + (if (id? id) + (datum->stx id datum) + (error 'datum->syntax "~s is not an identifier" id)))) + (define syntax->datum + (lambda (x) (stx->datum x))) + (define eval-r6rs-top-level (lambda (x*) (let-values ([(lib* invoke-code) (top-level-expander x*)]) diff --git a/src/makefile.ss b/src/makefile.ss index 3241406..c852f5c 100755 --- a/src/makefile.ss +++ b/src/makefile.ss @@ -408,7 +408,9 @@ [syntax-error i syncase] [generate-temporaries i syncase] [free-identifier=? i syncase] - [bound-identifier=? i syncase] + [bound-identifier=? i syncase] + [syntax->datum i syncase] + [datum->syntax i syncase] [code? i] [immediate? i] [pointer-value i]