diff --git a/collects/syntax/parse/private/kws.rkt b/collects/syntax/parse/private/kws.rkt index c9f94b3c07..00e1ebb4fd 100644 --- a/collects/syntax/parse/private/kws.rkt +++ b/collects/syntax/parse/private/kws.rkt @@ -46,7 +46,7 @@ An Arity is (arity-maxpos arity) (arity-minkws arity) (arity-maxkws arity) - pos-count keywords)]) + pos-count (sort keywords keyword (syntax-e #'b0)) (void)]) + +(define-syntax-class (Nat-Between #:lo lo #:hi hi) + #:description (format "~s <= Nat <= ~s" lo hi) + (pattern x:nat #:when (<= lo (syntax-e #'x) hi))) +(syntax-parse #'5 + [(~var _ (Nat-Between #:lo 0 #:hi 10)) (void)])