From a13b354d964cd188762aba8dd52566f314668ce2 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Thu, 13 Dec 2012 14:54:20 -0500 Subject: [PATCH] Simplify expansion of `pdefine:` and `define:` original commit: 6c716759d7e172bf1a092e584c56a56da778a0a8 --- collects/typed-racket/base-env/prims.rkt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/collects/typed-racket/base-env/prims.rkt b/collects/typed-racket/base-env/prims.rkt index ed02cc1d..f0a7c21f 100644 --- a/collects/typed-racket/base-env/prims.rkt +++ b/collects/typed-racket/base-env/prims.rkt @@ -340,8 +340,9 @@ This file defines two sorts of primitives. All of them are provided into any mod [(pdefine: (tvars:id ...) (nm:id . formals:annotated-formals) : ret-ty . body) (with-syntax ([type (syntax/loc #'ret-ty (All (tvars ...) (formals.arg-ty ... -> ret-ty)))]) (syntax/loc stx - (define: nm : type - (plambda: (tvars ...) formals . body))))])) + (begin + (: nm : type) + (define (nm . formals.ann-formals) . body))))])) (define-syntax (ann stx) (syntax-parse stx #:literals (:) @@ -372,8 +373,9 @@ This file defines two sorts of primitives. All of them are provided into any mod [(define: (tvars:id ...) (nm:id . formals:annotated-formals) : ret-ty body ...) (with-syntax ([type (syntax/loc #'ret-ty (All (tvars ...) (formals.arg-ty ... -> ret-ty)))]) (syntax/loc stx - (define: nm : type - (plambda: (tvars ...) formals body ...))))])) + (begin + (: nm : type) + (define (nm . formals.ann-formals) body ...))))])) (define-syntax (lambda: stx) (syntax-parse stx