From 088635c33a6bf42673c6c33eb15623e939f31baf Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Fri, 23 Sep 2016 19:57:01 -0400 Subject: [PATCH] check define-typed-stx has > 0 clauses to match stx-parse; add other paper abbrvs --- macrotypes/typecheck.rkt | 5 +++-- turnstile/turnstile.rkt | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/macrotypes/typecheck.rkt b/macrotypes/typecheck.rkt index 958c58e..5449439 100644 --- a/macrotypes/typecheck.rkt +++ b/macrotypes/typecheck.rkt @@ -17,6 +17,7 @@ (except-out (all-from-out racket/base) #%module-begin) (all-from-out syntax/parse/define) (for-syntax (all-defined-out)) (all-defined-out) + (rename-out [define-syntax-category define-stx-category]) (for-syntax (all-from-out racket syntax/parse racket/syntax syntax/stx "stx-utils.rkt")) @@ -62,13 +63,13 @@ (define-syntax (define-typed-syntax stx) (syntax-parse stx - [(_ name:id #:export-as out-name:id stx-parse-clause ...) + [(_ name:id #:export-as out-name:id stx-parse-clause ...+) #'(begin (provide (rename-out [name out-name])) (define-syntax (name syntx) (syntax-parameterize ([stx (make-rename-transformer #'syntx)]) (syntax-parse syntx stx-parse-clause ...))))] - [(_ name:id stx-parse-clause ...) + [(_ name:id stx-parse-clause ...+) #'(define-typed-syntax name #:export-as name stx-parse-clause ...)])) diff --git a/turnstile/turnstile.rkt b/turnstile/turnstile.rkt index 8dbccb0..ac06d94 100644 --- a/turnstile/turnstile.rkt +++ b/turnstile/turnstile.rkt @@ -2,6 +2,7 @@ (provide (except-out (all-from-out macrotypes/typecheck) -define-typed-syntax) define-typed-syntax + (rename-out [define-typed-syntax define-typerule]) (for-syntax syntax-parse/typed-syntax)) (require (except-in (rename-in @@ -376,7 +377,7 @@ [(def name:id (~and (~seq kw-stuff ...) :stxparse-kws) rule:rule - ...) + ...+) #'(-define-typed-syntax name kw-stuff ...