From a56b1f11fd7cb876dacba563b5ffaa734d07f0dd Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Mon, 2 Sep 2013 15:04:18 -0700 Subject: [PATCH] Make opt-parent shared across different uses. --- .../typed-racket/base-env/prims.rkt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt index ee08017739..cff5393ad1 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt @@ -79,6 +79,13 @@ This file defines two sorts of primitives. All of them are provided into any mod (define-for-syntax (ignore stx) (ignore-property stx #t)) +(begin-for-syntax + (define-syntax-class opt-parent + #:attributes (nm parent) + (pattern nm:id #:with parent #'#f) + (pattern (nm:id parent:id)))) + + (define-syntaxes (require/typed-legacy require/typed) (let () (define-syntax-class opt-rename @@ -89,12 +96,6 @@ This file defines two sorts of primitives. All of them are provided into any mod #:with spec #'(orig-nm internal-nm) #:with nm #'internal-nm)) - (define-syntax-class opt-parent - #:attributes (nm parent) - (pattern nm:id - #:with parent #'#f) - (pattern (nm:id parent:id))) - (define-syntax-class simple-clause #:attributes (nm ty) (pattern [nm:opt-rename ty])) @@ -670,9 +671,6 @@ This file defines two sorts of primitives. All of them are provided into any mod (define-syntaxes (require-typed-struct-legacy require-typed-struct) (let () - (define-syntax-class opt-parent - (pattern nm:id #:attr parent #'#f) - (pattern (nm:id parent:id))) (define-splicing-syntax-class (constructor-term legacy struct-name) (pattern (~seq) #:fail-when legacy #f #:attr name struct-name #:attr extra #f)