source: project/release/3/box/tags/1.8/box-eggdoc.scm @ 9365

Last change on this file since 9365 was 9365, checked in by Kon Lovett, 12 years ago

Canon dir struct

File size: 4.2 KB
Line 
1;;;; box-eggdoc.scm
2
3(use eggdoc)
4
5(define license #<<EOF
6Copyright (c) 2006, Kon Lovett.  All rights reserved.
7
8Permission is hereby granted, free of charge, to any person obtaining a
9copy of this software and associated documentation files (the Software),
10to deal in the Software without restriction, including without limitation
11the rights to use, copy, modify, merge, publish, distribute, sublicense,
12and/or sell copies of the Software, and to permit persons to whom the
13Software is furnished to do so, subject to the following conditions:
14
15The above copyright notice and this permission notice shall be included
16in all copies or substantial portions of the Software.
17
18THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24OTHER DEALINGS IN THE SOFTWARE.
25EOF
26)
27
28(define doc `(
29  (eggdoc:begin
30    (name "box")
31    (description (p "Boxing"))
32    (author
33      (url "mailto:klovett@pacbell.net" "Kon Lovett"))
34    (usage)
35    (download "box.egg")
36
37    (documentation
38
39      (p "This egg is " (b "unsafe") ".")
40
41      (subsection "Boxed Values"
42
43                                (p "The read and print syntax for a box is #&" (i "object") " where "
44                                (i "object") " is the contents of the box. However, only mutable "
45                                "boxes will be recovered. An immutable or variable box will lose "
46                                "identity when printed.")
47
48        (procedure "(make-box [INITIAL-VALUE [#:immutable? #f]])"
49          (p "Returns a box with the optional " (tt "INITIAL-VALUE") ". "
50          "The " (tt "#:immutable?") " parameter does what it says.") )
51
52        (macro "(make-box-variable VARIABLE [#:immutable? #f])"
53          (p "Returns a boxed reference to the variable "
54          (tt "VARIABLE") ", which must be in lexical-scope."))
55
56        (macro "(make-box-location TYPE [INITIAL-VALUE [#:immutable? #f]])"
57          (p "Returns a boxed reference to a location variable of "
58          (tt "TYPE") ", with optional " (tt "INITIAL-VALUE") " and "
59          (tt "#:immutable?") " parameters as " (code "make-box") ".")
60
61          (p (em "Note") " this macro can only be used in compiled source!") )
62
63        (procedure "(box? BOX)"
64          (p "Is it a box?"))
65
66        (procedure "(box-mutable? BOX)"
67          (p "Is it a mutable box?"))
68
69        (procedure "(box-immutable? BOX)"
70          (p "Is it an immutable box?"))
71
72        (procedure "(box-variable? BOX)"
73          (p "Is it a boxed variable?"))
74
75        (procedure "(box-set! BOX VALUE)"
76          (p "Sets the boxed value to " (tt "VALUE") "."))
77
78        (procedure "(box-ref BOX)"
79          (p "Returns the boxed value."))
80
81        (procedure "(box-location BOX)"
82          (p "Returns the location of the boxed value."))
83      )
84
85      (subsection "MzScheme-Like"
86
87        (p "Needs " (code "(use  box-mzs)") ".")
88
89        (macro "(box INITIAL-VALUE)"
90          (p "Returns a box with the " (tt "INITIAL-VALUE") "."))
91
92        (macro "(box-immutable VALUE)"
93          (p "Returns a box with the " (tt "VALUE") ". Signals an
94          error upon attempted set."))
95
96        (macro "(box-variable VARIABLE)"
97          (p "Returns a boxed reference to the variable " (tt
98          "VARIABLE") ", which must be in lexical-scope."))
99
100        (macro "(set-box! BOX VALUE)"
101          (p "Sets the boxed value to " (tt "VALUE") "."))
102
103        (macro "(unbox BOX)"
104          (p "Returns the boxed value."))
105      )
106    )
107
108    (history
109      (version "1.8" "Bugfix for immutable? keyword argument handling.")
110      (version "1.7" "Added immutable? keyword argument, 'make-box-location', and 'box-location'.")
111      (version "1.6" "Slightly smaller, print syntax")
112      (version "1.5" "#& box read syntax")
113      (version "1.4" "box-ref/set! now procedures")
114      (version "1.3" "Exports")
115      (version "1.2" "Added MzScheme-like box api, changed references")
116      (version "1.1" "Added references, different implementation of box")
117      (version "1.0" "Initial release"))
118
119    (section "License" (pre ,license))
120  )
121))
122
123(eggdoc->html doc)
Note: See TracBrowser for help on using the repository browser.