From f43a75e8cfe17edb633280d03e129382604e155a Mon Sep 17 00:00:00 2001 From: Jesse Alama Date: Sun, 12 May 2019 07:32:33 +0200 Subject: [PATCH 1/2] Use nonnegative-integer? in favor of natural-number? The natural-number? predicate seems to be unavailable (though there is a remnant of it in the form of natural-number/c, which is just a contract alias of exact-nonnegative-integer?). In any case, it surely means nonnegative integer. (One might push the envelope here slightly and add exactness, but this commit does not go that far.) --- brag/brag/brag.scrbl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/brag/brag/brag.scrbl b/brag/brag/brag.scrbl index 739a8e7..f7cab87 100755 --- a/brag/brag/brag.scrbl +++ b/brag/brag/brag.scrbl @@ -1042,9 +1042,9 @@ In addition to the exports shown below, the @racketmodname[brag/support] module @defproc[(token [type (or/c string? symbol?)] [val any/c #f] [#:line line (or/c positive-integer? #f) #f] - [#:column column (or/c natural-number? #f) #f] + [#:column column (or/c nonnegative-integer? #f) #f] [#:position position (or/c positive-integer? #f) #f] - [#:span span (or/c natural-number? #f) #f] + [#:span span (or/c nonnegative-integer? #f) #f] [#:skip? skip? boolean? #f] ) token-struct?]{ @@ -1060,9 +1060,9 @@ In addition to the exports shown below, the @racketmodname[brag/support] module @defstruct[token-struct ([type symbol?] [val any/c] [position (or/c positive-integer? #f)] - [line (or/c natural-number? #f)] + [line (or/c nonnegative-integer? #f)] [column (or/c positive-integer? #f)] - [span (or/c natural-number? #f)] + [span (or/c nonnegative-integer? #f)] [skip? boolean?]) #:transparent]{ The token structure type. -- 2.25.1 From 306fb049eef96c498bc62bd8c83a8bdac8881a08 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 12 May 2019 09:43:09 -0500 Subject: [PATCH 2/2] exactness --- brag/brag/brag.scrbl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/brag/brag/brag.scrbl b/brag/brag/brag.scrbl index f7cab87..9c8e775 100755 --- a/brag/brag/brag.scrbl +++ b/brag/brag/brag.scrbl @@ -1041,10 +1041,10 @@ In addition to the exports shown below, the @racketmodname[brag/support] module @defproc[(token [type (or/c string? symbol?)] [val any/c #f] - [#:line line (or/c positive-integer? #f) #f] - [#:column column (or/c nonnegative-integer? #f) #f] - [#:position position (or/c positive-integer? #f) #f] - [#:span span (or/c nonnegative-integer? #f) #f] + [#:line line (or/c exact-positive-integer? #f) #f] + [#:column column (or/c exact-nonnegative-integer? #f) #f] + [#:position position (or/c exact-positive-integer? #f) #f] + [#:span span (or/c exact-nonnegative-integer? #f) #f] [#:skip? skip? boolean? #f] ) token-struct?]{ @@ -1059,10 +1059,10 @@ In addition to the exports shown below, the @racketmodname[brag/support] module @defstruct[token-struct ([type symbol?] [val any/c] - [position (or/c positive-integer? #f)] - [line (or/c nonnegative-integer? #f)] - [column (or/c positive-integer? #f)] - [span (or/c nonnegative-integer? #f)] + [position (or/c exact-positive-integer? #f)] + [line (or/c exact-nonnegative-integer? #f)] + [column (or/c exact-positive-integer? #f)] + [span (or/c exact-nonnegative-integer? #f)] [skip? boolean?]) #:transparent]{ The token structure type. -- 2.25.1