Adding more specific contracts
svn: r15709
This commit is contained in:
parent
d8bc61ae41
commit
3432cf282f
|
@ -10,8 +10,11 @@
|
|||
|
||||
(provide/contract
|
||||
[cite ((string?) () #:rest (listof string?) . ->* . element?)]
|
||||
[bib-entry ((#:key string? #:title any/c) ; XXX should be pre-content or #f
|
||||
(#:is-book? any/c #:author any/c #:location any/c #:date any/c #:url any/c)
|
||||
[bib-entry ((#:key string? #:title (or/c false/c pre-content?))
|
||||
(#:is-book? boolean? #:author (or/c false/c pre-content?)
|
||||
#:location (or/c false/c pre-content?)
|
||||
#:date (or/c false/c pre-content?)
|
||||
#:url (or/c false/c pre-content?))
|
||||
. ->* .
|
||||
a-bib-entry?)]
|
||||
[rename a-bib-entry? bib-entry? (any/c . -> . boolean?)]
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
make-binding-redirect-elements
|
||||
sigelem)
|
||||
(provide/contract
|
||||
; XXX any/c should be boolean?
|
||||
[defidentifier ((identifier?) (#:form? any/c #:index? any/c #:show-libs? any/c) . ->* . element?)])
|
||||
[defidentifier ((identifier?) (#:form? boolean? #:index? boolean? #:show-libs? boolean?) . ->* . element?)])
|
||||
|
||||
(define (gen-absolute-tag)
|
||||
`(abs ,(make-generated-tag)))
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
[undefined-const element?]
|
||||
[hash-lang (-> element?)]
|
||||
[etc string?]
|
||||
[inset-flow (() () #:rest (listof any/c) . ->* . any/c)] ; XXX no docs and bad return contract
|
||||
[inset-flow (() () #:rest (listof pre-content?) . ->* . any/c)] ; XXX no docs and bad return contract
|
||||
[litchar (() () #:rest (listof string?) . ->* . element?)]
|
||||
[t (() () #:rest (listof pre-content?) . ->* . paragraph?)]
|
||||
[commandline (() () #:rest (listof pre-content?) . ->* . paragraph?)]
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
"manual-style.ss")
|
||||
|
||||
(provide/contract
|
||||
; XXX boolean?
|
||||
[deftech (() (#:style? any/c) #:rest (listof pre-content?) . ->* . element?)]
|
||||
[deftech (() (#:style? boolean?) #:rest (listof pre-content?) . ->* . element?)]
|
||||
[tech (() (#:doc (or/c module-path? false/c) #:tag-prefixes (or/c (listof string?) false/c)) #:rest (listof pre-content?) . ->* . element?)]
|
||||
[techlink (() (#:doc (or/c module-path? false/c) #:tag-prefixes (or/c (listof string?) false/c)) #:rest (listof pre-content?) . ->* . element?)])
|
||||
|
||||
|
|
|
@ -2,16 +2,18 @@
|
|||
(require "../struct.ss"
|
||||
"../decode.ss"
|
||||
"../base.ss"
|
||||
(only-in "../core.ss"
|
||||
content?)
|
||||
scheme/contract
|
||||
scheme/list)
|
||||
|
||||
(provide doc-prefix)
|
||||
(provide/contract
|
||||
[spacer element?]
|
||||
[to-flow (any/c . -> . flow?)] ; XXX element?
|
||||
[to-flow (content? . -> . flow?)]
|
||||
[flow-spacer flow?]
|
||||
[flow-empty-line flow?]
|
||||
[make-table-if-necessary (any/c list? . -> . (list/c (or/c omitable-paragraph? table?)))] ; XXX element?
|
||||
[make-table-if-necessary (content? list? . -> . (list/c (or/c omitable-paragraph? table?)))]
|
||||
[max-proto-width exact-nonnegative-integer?])
|
||||
|
||||
(define spacer (hspace 1))
|
||||
|
|
|
@ -651,9 +651,9 @@ Like @scheme[schemegrammar], but for typesetting multiple productions
|
|||
at once, aligned around the @litchar{=} and @litchar{|}.}
|
||||
|
||||
@defproc[(defidentifier [id identifier?]
|
||||
[#:form? form? any/c #f]
|
||||
[#:index? index? any/c #t]
|
||||
[#:show-libs? show-libs? any/c #t])
|
||||
[#:form? form? boolean? #f]
|
||||
[#:index? index? boolean? #t]
|
||||
[#:show-libs? show-libs? boolean? #t])
|
||||
element?]{
|
||||
|
||||
Typesets @scheme[id] as a Scheme identifier, and also establishes the
|
||||
|
@ -906,7 +906,7 @@ An alias of @scheme[hyperlink] for backward compatibility.}
|
|||
An alias of @scheme[other-doc] for backward compatibility.}
|
||||
|
||||
@defproc[(deftech [pre-content pre-content?] ...
|
||||
[#:style? style? any/c #t]) element?]{
|
||||
[#:style? style? boolean? #t]) element?]{
|
||||
|
||||
Produces an element for the @tech{decode}d @scheme[pre-content], and
|
||||
also defines a term that can be referenced elsewhere using
|
||||
|
@ -1031,12 +1031,12 @@ which is created with @scheme[bib-entry]. The entries are typeset in
|
|||
order as given.}
|
||||
|
||||
@defproc[(bib-entry [#:key key string?]
|
||||
[#:title title any/c]
|
||||
[#:is-book? is-book? any/c #f]
|
||||
[#:author author any/c #f]
|
||||
[#:location location any/c #f]
|
||||
[#:date date any/c #f]
|
||||
[#:url url any/c #f])
|
||||
[#:title title (or/c false/c pre-content?)]
|
||||
[#:is-book? is-book? boolean? #f]
|
||||
[#:author author (or/c false/c pre-content?) #f]
|
||||
[#:location location (or/c false/c pre-content?) #f]
|
||||
[#:date date (or/c false/c pre-content?) #f]
|
||||
[#:url url (or/c false/c pre-content?) #f])
|
||||
bib-entry?]{
|
||||
|
||||
Creates a bibliography entry. The @scheme[key] is used to refer to the
|
||||
|
|
Loading…
Reference in New Issue
Block a user