allow content (not just a string) for #:kind in defthing
, etc.
Although commit 5415cca336
just made run-time checking consistent with
the documentation, the implementation turned out to allow content
before, and some existing documents relied on that. Changes the
documentation and contract to allow content, instead.
This commit is contained in:
parent
0c93db954a
commit
b3f7015cba
|
@ -836,7 +836,7 @@ Equivalent to @racket[defmodule] variants @racket[#:no-declare].}
|
||||||
ellipses+]
|
ellipses+]
|
||||||
[options (code:line maybe-kind maybe-link maybe-id)]
|
[options (code:line maybe-kind maybe-link maybe-id)]
|
||||||
[maybe-kind code:blank
|
[maybe-kind code:blank
|
||||||
(code:line #:kind kind-string-expr)]
|
(code:line #:kind kind-content-expr)]
|
||||||
[maybe-link code:blank
|
[maybe-link code:blank
|
||||||
(code:line #:link-target? link-target?-expr)]
|
(code:line #:link-target? link-target?-expr)]
|
||||||
[maybe-id code:blank
|
[maybe-id code:blank
|
||||||
|
@ -945,8 +945,8 @@ by the @racket[current-display-width] parameter.
|
||||||
|
|
||||||
An optional @racket[#:kind] specification chooses the decorative
|
An optional @racket[#:kind] specification chooses the decorative
|
||||||
label, which defaults to @racket["procedure"]. A @racket[#f]
|
label, which defaults to @racket["procedure"]. A @racket[#f]
|
||||||
result for @racket[kind-string-expr] uses the default, otherwise
|
result for @racket[kind-content-expr] uses the default, otherwise
|
||||||
@racket[kind-string-expr] should produce a string. An alternate
|
@racket[kind-content-expr] should produce content in the sense of @racket[content?]. An alternate
|
||||||
label should be all lowercase.
|
label should be all lowercase.
|
||||||
|
|
||||||
If @racket[#:id [src-id dest-id-expr]] is supplied, then
|
If @racket[#:id [src-id dest-id-expr]] is supplied, then
|
||||||
|
@ -1007,7 +1007,7 @@ Examples:
|
||||||
pre-flow ...)
|
pre-flow ...)
|
||||||
([options (code:line maybe-kind maybe-link maybe-id maybe-literals)]
|
([options (code:line maybe-kind maybe-link maybe-id maybe-literals)]
|
||||||
[maybe-kind code:blank
|
[maybe-kind code:blank
|
||||||
(code:line #:kind kind-string-expr)]
|
(code:line #:kind kind-content-expr)]
|
||||||
[maybe-link code:blank
|
[maybe-link code:blank
|
||||||
(code:line #:link-target? link-target?-expr)]
|
(code:line #:link-target? link-target?-expr)]
|
||||||
[maybe-id code:blank
|
[maybe-id code:blank
|
||||||
|
@ -1028,7 +1028,7 @@ result of @racket[id-expr]) whose syntax is described by
|
||||||
@racket[id], then @racket[form-datum] must have the form @racket[(id
|
@racket[id], then @racket[form-datum] must have the form @racket[(id
|
||||||
. _datum)].
|
. _datum)].
|
||||||
|
|
||||||
If @racket[#:kind kind-string-expr] is supplied, it is used in the
|
If @racket[#:kind kind-content-expr] is supplied, it is used in the
|
||||||
same way as for @racket[defproc], but the default kind is
|
same way as for @racket[defproc], but the default kind is
|
||||||
@racket["syntax"].
|
@racket["syntax"].
|
||||||
|
|
||||||
|
@ -1338,7 +1338,7 @@ Like @racket[defparam], but the contract on a parameter argument is
|
||||||
pre-flow ...)
|
pre-flow ...)
|
||||||
([options (code:line maybe-kind maybe-link maybe-id)]
|
([options (code:line maybe-kind maybe-link maybe-id)]
|
||||||
[maybe-kind code:blank
|
[maybe-kind code:blank
|
||||||
(code:line #:kind kind-string-expr)]
|
(code:line #:kind kind-content-expr)]
|
||||||
[maybe-link code:blank
|
[maybe-link code:blank
|
||||||
(code:line #:link-target? link-target?-expr)]
|
(code:line #:link-target? link-target?-expr)]
|
||||||
[maybe-id code:blank
|
[maybe-id code:blank
|
||||||
|
@ -1348,7 +1348,7 @@ Like @racket[defparam], but the contract on a parameter argument is
|
||||||
|
|
||||||
Like @racket[defproc], but for a non-procedure binding.
|
Like @racket[defproc], but for a non-procedure binding.
|
||||||
|
|
||||||
If @racket[#:kind kind-string-expr] is supplied,
|
If @racket[#:kind kind-content-expr] is supplied,
|
||||||
it is used in the same way as for
|
it is used in the same way as for
|
||||||
@racket[defproc], but the default kind is @racket["value"].
|
@racket[defproc], but the default kind is @racket["value"].
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
"../basic.rkt"
|
"../basic.rkt"
|
||||||
"../manual-struct.rkt"
|
"../manual-struct.rkt"
|
||||||
(only-in "../core.rkt"
|
(only-in "../core.rkt"
|
||||||
make-style make-table-columns)
|
make-style
|
||||||
|
make-table-columns
|
||||||
|
content?)
|
||||||
"../html-properties.rkt"
|
"../html-properties.rkt"
|
||||||
"qsloc.rkt"
|
"qsloc.rkt"
|
||||||
"manual-utils.rkt"
|
"manual-utils.rkt"
|
||||||
|
@ -131,7 +133,7 @@
|
||||||
#:attributes (kind) ;; Expr[String/#f]
|
#:attributes (kind) ;; Expr[String/#f]
|
||||||
#:description "#:kind keyword"
|
#:description "#:kind keyword"
|
||||||
(pattern (~optional (~seq #:kind k))
|
(pattern (~optional (~seq #:kind k))
|
||||||
#:declare k (expr/c #'(or/c string? #f) #:name "#:kind argument")
|
#:declare k (expr/c #'(or/c content? #f) #:name "#:kind argument")
|
||||||
#:with kind #'(~? k.c #f)))
|
#:with kind #'(~? k.c #f)))
|
||||||
|
|
||||||
(define-splicing-syntax-class value-kw
|
(define-splicing-syntax-class value-kw
|
||||||
|
|
Loading…
Reference in New Issue
Block a user