From 6c5372e15f3674d57d68dfc5b3c63eaf26f321f2 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Sat, 25 May 2013 20:30:59 -0700 Subject: [PATCH] Make TR's lambda not do datum->syntax. original commit: dce13a36b97307abed9d0c3e40a0930476016ef1 --- collects/typed-racket/base-env/prims.rkt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/typed-racket/base-env/prims.rkt b/collects/typed-racket/base-env/prims.rkt index 57d41a41..ad9829c2 100644 --- a/collects/typed-racket/base-env/prims.rkt +++ b/collects/typed-racket/base-env/prims.rkt @@ -1066,8 +1066,6 @@ This file defines two sorts of primitives. All of them are provided into any mod (define-syntax (-lambda stx) (syntax-parse stx [(_ formals . body) - (define d (datum->syntax stx `(,#'λ ,#'formals . ,#'body) - stx stx)) (define-values (has-kw? has-opt?) (syntax-parse #'formals ((~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 (ormap keyword? (map syntax-e 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, ;; which are harder to typecheck