src/utilities.lisp: Share `int' to `sod' and `optparse' packages.
[sod] / doc / module.tex
1 %%% -*-latex-*-
2 %%%
3 %%% Modules
4 %%%
5 %%% (c) 2015 Straylight/Edgeware
6 %%%
7
8 %%%----- Licensing notice ---------------------------------------------------
9 %%%
10 %%% This file is part of the Sensible Object Design, an object system for C.
11 %%%
12 %%% SOD is free software; you can redistribute it and/or modify
13 %%% it under the terms of the GNU General Public License as published by
14 %%% the Free Software Foundation; either version 2 of the License, or
15 %%% (at your option) any later version.
16 %%%
17 %%% SOD is distributed in the hope that it will be useful,
18 %%% but WITHOUT ANY WARRANTY; without even the implied warranty of
19 %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 %%% GNU General Public License for more details.
21 %%%
22 %%% You should have received a copy of the GNU General Public License
23 %%% along with SOD; if not, write to the Free Software Foundation,
24 %%% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26 \chapter{Modules} \label{ch:module}
27
28 %%%--------------------------------------------------------------------------
29
30 \begin{describe}{fun}{add-module-binding @<symbol> @<thunk>}
31 \end{describe}
32
33 \begin{describe}{mac}{define-module-var @<name> @<value-form> @<doc-string>}
34 \end{describe}
35
36 \begin{describe}{mac}
37 {with-module-environment (@[@<module>@]) @<declaration>^* @<form>^*}
38 \end{describe}
39
40 \begin{describe}{fun}{add-clear-the-decks-function @<symbol> @<thunk>}
41 \end{describe}
42
43 \begin{describe}{mac}
44 {define-clear-the-decks @<symbol>
45 @[[ @<declaration>^* @! @<doc-string> @]]
46 @<form>^*}
47 \end{describe}
48
49 \begin{describe}{fun}{clear-the-decks}
50 \end{describe}
51
52 \begin{describe}{cls}
53 {module () \&key :name :pset :items :dependencies :variables :state}
54 \end{describe}
55
56 \begin{describe*}
57 {\dhead{gf}{module-name @<module> @> @<pathname>}
58 \dhead{gf}{module-pset @<module> @> @<pset>}
59 \dhead{gf}{module-errors @<module> @> @<integer>}
60 \dhead{gf}{module-items @<module> @> @<list>}
61 \dhead{gf}{module-dependencies @<module> @> @<list>}
62 \dhead{gf}{module-state @<module> @> @<keyword>}}
63 \end{describe*}
64
65 \begin{describe}{var}{*module*}
66 \end{describe}
67
68 \begin{describe}{gf}{module-import @<object>}
69 \end{describe}
70
71 \begin{describe}{gf}{add-to-module @<module> @<item>}
72 \end{describe}
73
74 \begin{describe}{gf}{finalize-module @<module>}
75 \end{describe}
76
77 \begin{describe}{mac}
78 {define-module
79 (@<name> @[[ :truename @<pathname> @! :location @<floc> @]])
80 @<declaration>^*
81 @<form>^*
82 \nlret @<module>}
83 \end{describe}
84
85 \begin{describe}{mac}{with-temporary-module () @<declaration>^* @<body>^*}
86 \end{describe}
87
88 \begin{describe}{cls}{type-item () \&key :name}
89 \end{describe}
90
91 \begin{describe}{cls}
92 {code-fragment-item () \&key :fragment :reason :name :constraints}
93 \end{describe}
94
95 \begin{describe*}
96 {\dhead{gf}{code-fragment @<fragment-item> @> @<fragment>}
97 \dhead{gf}{code-fragment-name @<fragment-item> @> @<name>}
98 \dhead{gf}{code-fragment-reason @<fragment-item> @> @<keyword>}
99 \dhead{gf}{code-fragment-constraints @<fragment-item> @> @<list>}}
100 \end{describe*}
101
102 \begin{describe}{var}{*module-dirs*}
103 \end{describe}
104
105 \begin{describe}{fun}{find-file @<scanner> @<name> @<what> @<thunk>}
106 \end{describe}
107
108 \begin{describe}{fun}
109 {read-module @<pathname> \&key :truename :location @> @<module>}
110 \end{describe}
111
112 \begin{describe}{plug}{module @<scanner> @<pset>}
113 \end{describe}
114
115 \begin{describe}{plug}{class-item @<scanner> @<class> @<pset>}
116 \end{describe}
117
118 \begin{describe}{var}{*builtin-module*}
119 \end{describe}
120
121 \begin{describe}{fun}{make-builtin-module @> @<module>}
122 \end{describe}
123
124 %%%----- That's all, folks --------------------------------------------------
125
126 %%% Local variables:
127 %%% mode: LaTeX
128 %%% TeX-master: "sod.tex"
129 %%% TeX-PDF-mode: t
130 %%% End: