This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.
Source for wiki HygienicInclusion version 2
author
cowan
comment
ipnr
127.10.177.1
name
HygienicInclusion
readonly
0
text
Are inclusions hygienic?
Given the macro
{{{
(define-syntax m
(syntax-rules ()
((_) (lambda (a) (include "add.scm")))))
}}}
where `add.scm` contains `(+ a 1)`, is the `a` that is bound inside the macro the same as the `a` in `add.scm`? In particular, does `((m) 32)` evaluate to 33, or is `a` reported as an undefined variable?
Evaluates to 33: Racket, Gambit, Guile, Kawa, SISC, Chez, Mosh, !IronScheme, SXM
`a` is undefined: Gauche, Chicken, Chibi, STklos, S7, Owl Lisp
`include` is undefined: MIT, Bigloo, Scheme48/scsh, SCM, Vicare, Larceny, Ypsilon, Scheme 9
No syntax-rules macros: NexJ, JScheme, KSi, RScheme, !SigScheme, Shoe, !TinyScheme, Dream, BDC, XLisp, Schemik, Elk, UMB, Oaklisp, Llava, Sizzle, !FemtoLisp, Dfsch, Inlab
time
2013-12-31 23:20:58
version
2