manual.scrbl (5047B)
1 #lang scribble/manual 2 @(require (for-label racket/base 3 "manual-ex.rkt")) 4 5 @defmodule["manual-ex.rkt" #:packages ("manual-test")] 6 7 @defproc[(f) integer?]{A function.} 8 9 @defproc[(g [x void?] [y void?]) integer?]{A function with two arguments.} 10 11 @defproc[#:kind "function" (h [x void?] [#:y y void?]) integer?]{A ``function'' with a keyword argument.} 12 13 @defproc[(i [x void?] [#:y y void? (void)]) integer?]{A function with an optional keyword argument.} 14 15 @defproc[#:link-target? #f (f) integer?]{A function, again, not a link target.} 16 17 @defproc[#:link-target? #f (f) integer? #:value 10]{A function, again, not a link target, documented to return @racket[10].} 18 19 @defproc[#:link-target? #f (f) integer? #:value (let () 20 (define x 10) 21 x)]{ 22 A function, again, not a link target, documented to return @racket[10] using a definition. 23 } 24 25 @defproc[#:kind "function" #:link-target? #f (g [x void?]) integer?]{A ``function,'' again, not a link target.} 26 27 @defproc[#:id [i #'j] (i) void?]{Source is @racket[i], documents @racket[j].} 28 29 @defproc*[#:link-target? #f ([(f) integer?] [(g [x void?] [y void?]) void?])]{Functions, yet again.} 30 31 32 @defform[(m datum)]{A syntactic form.} 33 34 @defform[#:link-target? #f (m datum)]{A syntactic form, again.} 35 36 @defform[#:kind "macro" #:link-target? #f (m datum)]{A ``macro,'' again.} 37 38 @defform*[#:kind "macro" #:link-target? #f [(m datum) (m same-datum)]]{A ``macro,'' yet again.} 39 40 @defform/none[(m datum)]{Yet again.} 41 42 @defidform[n]{An identifier form.} 43 44 @defidform[#:link-target? #f n]{An identifier form, again.} 45 46 @specform[(m datum)]{Specification of @racket[m].} 47 48 49 @defparam[p k integer?]{A parameter} 50 51 @defparam[#:link-target? #f p k integer?]{A parameter, again.} 52 53 @defparam[#:link-target? #f p k integer? #:value 10]{A parameter, again, with a documented default value.} 54 55 @defparam*[#:link-target? #f p k real? integer?]{A parameter, yet again.} 56 57 @defparam*[#:link-target? #f p k real? integer? #:value 10]{A parameter, yet again, with a documented default value.} 58 59 @defboolparam[q on?]{A boolean parameter.} 60 61 @defboolparam[#:link-target? #f q still-on?]{A boolean parameter, again.} 62 63 @defboolparam[#:link-target? #f q still-on? #:value #f]{A boolean parameter, again, with a documented default value.} 64 65 66 @defthing[v integer?]{A thing.} 67 68 @defthing[#:link-target? #f v integer?]{A thing, again.} 69 70 @defthing[#:link-target? #f v integer? #:value 10]{A thing, again, with a documented value.} 71 72 @defthing[#:link-target? #f v integer? #:value 12345678901234567890123456789012345678901234567890]{A thing, again, with a documented value that's too wide to fit on one line.} 73 74 75 @defstruct[pt ([x real?] [y real?])]{A structure type with extra name.} 76 77 @defstruct*[pn ([x real?] [y real?])]{A structure type.} 78 79 @defstruct*[#:link-target? #f pn ([x real?] [y real?])]{A structure type, again.} 80 81 @defstruct*[#:link-target? #f pn ([x real?] [y real?]) #:transparent]{A transparent structure type, again.} 82 83 @defstruct*[#:link-target? #f pn ([x real?] [y real?]) #:inspector #f]{A transparent structure type, again.} 84 85 @defstruct*[#:link-target? #f pn ([x real?] [y real?]) #:prefab]{A prefab structure type, again.} 86 87 @defstruct*[#:link-target? #f pn ([x real?] [y real?]) #:constructor-name pt]{A structure type with name, again.} 88 89 @defstruct*[#:link-target? #f pn ([x real?] [y real?]) #:extra-constructor-name pt]{A structure type with extra name, again.} 90 91 @defstruct[#:link-target? #f pt ([x real?] [y real?]) #:mutable]{A mutable structure type with extra name, again.} 92 93 @defstruct[a-struct-with-an-extremely-long-name-and-no-fields ()]{Used to raise error, taking car of empty fields list. Reported by Carlos Lopez, 2017-03-11.} 94 95 96 @defmodule["manual-ex0.rkt" #:no-declare #:link-target? #f #:packages ()] 97 @defmodule["manual-ex0.rkt" #:lang #:no-declare #:link-target? #f #:packages ()] 98 @defmodule["manual-ex0.rkt" #:reader #:no-declare #:link-target? #f #:packages ()] 99 100 @section{Sub2} 101 @defmodule["manual-ex2.rkt" #:no-declare #:packages ()] 102 103 @section{Sub2a} 104 @defmodule*/no-declare[("manual-ex2a.rkt") #:packages ()] 105 106 @section{Sub3} 107 @defmodule["manual-ex3.rkt" #:lang #:no-declare #:packages ()] 108 109 @section{Sub3a} 110 @defmodulelang*/no-declare[("manual-ex3a.rkt") #:packages ()] 111 112 @section{Sub4-5} 113 @defmodule[#:multi ("manual-ex4.rkt" "manual-ex5.rkt") #:packages ()] 114 115 @section{Sub4a-5a} 116 @defmodule*[("manual-ex4a.rkt" "manual-ex5a.rkt") #:packages ()] 117 118 @section{Sub6} 119 @defmodule[#:require-form (racket load) "manual-ex6.rkt" #:packages ()] 120 121 @section{Sub6a} 122 @defmodule*[#:require-form (racket load) ("manual-ex6a.rkt") #:packages ()] 123 124 @section{Sub7} 125 @defmodule["manual-ex7.rkt" #:use-sources (racket/base) #:packages ()] 126 127 @section{Sub7a} 128 @defmodule*[("manual-ex7a.rkt") #:use-sources (racket/base) #:packages ()] 129 130 @section{Sub8} 131 @defmodule["manual-ex8.rkt" #:reader #:packages ()] 132 133 @section{Sub8a} 134 @defmodulereader["manual-ex8a.rkt" #:packages ()] 135 136 @section{Sub8b} 137 @defmodulereader*[("manual-ex8b.rkt") #:packages ()]