From a7531326ea4b3d39bc63e51e871cb9fd9a2c05e1 Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Wed, 22 Jun 2016 08:16:19 -0400 Subject: [PATCH] fix nullable-EH-pat warning --- tapl/typed-lang-builder/typed-lang-builder.rkt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tapl/typed-lang-builder/typed-lang-builder.rkt b/tapl/typed-lang-builder/typed-lang-builder.rkt index 9f36fe6..da55d54 100644 --- a/tapl/typed-lang-builder/typed-lang-builder.rkt +++ b/tapl/typed-lang-builder/typed-lang-builder.rkt @@ -206,6 +206,10 @@ last-clause.pat clause.pat ... ...) last-clause.stuff ...]]) + (define-splicing-syntax-class stxparse-kws + [pattern (~seq (~or (~seq :keyword _) + (~seq :keyword)) + ...)]) ) (require (for-meta 1 'syntax-classes) (for-meta 2 'syntax-classes)) @@ -214,14 +218,12 @@ (lambda (stx) (syntax-parse stx [(def name:id - (~and (~seq stuff ...) (~or (~seq :keyword _) - (~seq :keyword))) - ... + (~and (~seq kw-stuff ...) :stxparse-kws) rule:rule ...) #'(-define-typed-syntax name - stuff ... ... + kw-stuff ... rule.norm ...)]))) @@ -231,14 +233,12 @@ (syntax-parse stx [(stxparse stx-id:id - (~and (~seq stuff ...) (~or (~seq :keyword _) - (~seq :keyword))) - ... + (~and (~seq kw-stuff ...) :stxparse-kws) rule:rule ...) #'(syntax-parse stx-id - stuff ... ... + kw-stuff ... rule.norm ...)]))))