Make TR's lambda not do datum->syntax.
This commit is contained in:
parent
698080afc0
commit
dce13a36b9
|
@ -1066,8 +1066,6 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
||||||
(define-syntax (-lambda stx)
|
(define-syntax (-lambda stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
[(_ formals . body)
|
[(_ formals . body)
|
||||||
(define d (datum->syntax stx `(,#'λ ,#'formals . ,#'body)
|
|
||||||
stx stx))
|
|
||||||
(define-values (has-kw? has-opt?)
|
(define-values (has-kw? has-opt?)
|
||||||
(syntax-parse #'formals
|
(syntax-parse #'formals
|
||||||
((~or (~and rest:id (~bind ((args 1) null)))
|
((~or (~and rest:id (~bind ((args 1) null)))
|
||||||
|
@ -1077,7 +1075,11 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
||||||
(values
|
(values
|
||||||
(ormap keyword? (map syntax-e arg-list))
|
(ormap keyword? (map syntax-e arg-list))
|
||||||
(ormap syntax->list arg-list)))))
|
(ormap syntax->list arg-list)))))
|
||||||
(opt-lambda-property (kw-lambda-property d has-kw?) has-opt?)]))
|
(opt-lambda-property
|
||||||
|
(kw-lambda-property
|
||||||
|
(syntax/loc stx (λ formals . body))
|
||||||
|
has-kw?)
|
||||||
|
has-opt?)]))
|
||||||
|
|
||||||
;; do this ourselves so that we don't get the static bindings,
|
;; do this ourselves so that we don't get the static bindings,
|
||||||
;; which are harder to typecheck
|
;; which are harder to typecheck
|
||||||
|
|
Loading…
Reference in New Issue
Block a user