original commit: 754d1c96a6f13c38cc31f7321aaf090bdbdb6d3e
This commit is contained in:
Matthew Flatt 2001-04-23 14:39:34 +00:00
parent 3852ba7a19
commit 4a7c055c77
4 changed files with 17 additions and 10 deletions

View File

@ -166,12 +166,13 @@
[(private . rest)
(bad "ill-formed private clause" stx)]
[(form idp ...)
(ormap (lambda (f) (module-identifier=? (syntax form) f))
(list (quote-syntax public)
(quote-syntax override)
(quote-syntax public-final)
(quote-syntax override-final)
(quote-syntax inherit)))
(and (identifier? (syntax form))
(ormap (lambda (f) (module-identifier=? (syntax form) f))
(list (quote-syntax public)
(quote-syntax override)
(quote-syntax public-final)
(quote-syntax override-final)
(quote-syntax inherit))))
(let ([form (syntax-e (syntax form))])
(for-each
(lambda (idp)
@ -217,8 +218,8 @@
[(null? l) null]
[(and (stx-pair? (car l))
(let ([id (stx-car (car l))])
(identifier? id)
(ormap (lambda (k) (module-identifier=? k id)) kws)))
(and (identifier? id)
(ormap (lambda (k) (module-identifier=? k id)) kws))))
(if reverse?
(loop (cdr l))
(cons (car l) (loop (cdr l))))]
@ -528,8 +529,11 @@
[(define-values (id ...) expr)
(syntax/loc e (set!-values (id ...) expr))]
[(-init idp ...)
(ormap (lambda (it) (module-identifier=? it (syntax -init)))
(list (quote-syntax init) (quote-syntax init-field)))
(and (identifier? (syntax -init))
(ormap (lambda (it)
(module-identifier=? it (syntax -init)))
(list (quote-syntax init)
(quote-syntax init-field))))
(let ([ids (map
(lambda (idp)
(if (identifier? idp)

View File

@ -193,6 +193,7 @@
(lambda (defn)
(let ([d (local-expand
defn
'internal-define
(kernel-form-identifier-list
(quote-syntax here)))])
(syntax-case d (define-values)

View File

@ -469,6 +469,7 @@
(if (eof-object? s)
s
(local-expand s
'internal-define
(append
user-stx-forms
local-vars))))]

View File

@ -90,6 +90,7 @@
(lambda (defn-or-expr)
(local-expand
defn-or-expr
'internal-define
(append
(kernel-form-identifier-list (quote-syntax here))
declared-names)))