chiark / gitweb /
doc/concepts.tex: Typeset method rĂ´le names as identifiers.
[sod] / doc / module.tex
CommitLineData
bca101d9
MW
1%%% -*-latex-*-
2%%%
3%%% Modules
4%%%
5%%% (c) 2015 Straylight/Edgeware
6%%%
7
8%%%----- Licensing notice ---------------------------------------------------
9%%%
e0808c47 10%%% This file is part of the Sensible Object Design, an object system for C.
bca101d9
MW
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}{cls}
50 {module () \&key :name :pset :items :dependencies :variables :state}
51\end{describe}
52
53\begin{describe*}
54 {\dhead{gf}{module-name @<module> @> @<pathname>}
55 \dhead{gf}{module-pset @<module> @> @<pset>}
56 \dhead{gf}{module-items @<module> @> @<list>}
57 \dhead{gf}{module-dependencies @<module> @> @<list>}
58 \dhead{gf}{module-state @<module> @> @<keyword>}}
59\end{describe*}
60
61\begin{describe}{var}{*module*}
62\end{describe}
63
64\begin{describe}{gf}{module-import @<object>}
65\end{describe}
66
67\begin{describe}{gf}{add-to-module @<module> @<item>}
68\end{describe}
69
70\begin{describe}{gf}{finalize-module @<module>}
71\end{describe}
72
73\begin{describe}{mac}
74 {define-module
75 (@<name> @[[ :truename @<pathname> @! :location @<floc> @]])
76 @<declaration>^*
77 @<form>^*
78 \nlret @<module>}
79\end{describe}
80
81\begin{describe}{mac}{with-temporary-module () @<declaration>^* @<body>^*}
82\end{describe}
83
84\begin{describe}{cls}{type-item () \&key :name}
85\end{describe}
86
87\begin{describe}{cls}
88 {code-fragment-item () \&key :fragment :reason :name :constraints}
89\end{describe}
90
91\begin{describe*}
92 {\dhead{gf}{code-fragment @<fragment-item> @> @<fragment>}
93 \dhead{gf}{code-fragment-name @<fragment-item> @> @<name>}
94 \dhead{gf}{code-fragment-reason @<fragment-item> @> @<keyword>}
95 \dhead{gf}{code-fragment-constraints @<fragment-item> @> @<list>}}
96\end{describe*}
97
98\begin{describe}{var}{*module-dirs*}
99\end{describe}
100
101\begin{describe}{fun}{find-file @<scanner> @<name> @<what> @<thunk>}
102\end{describe}
103
104\begin{describe}{fun}
105 {read-module @<pathname> \&key :truename :location @> @<module>}
106\end{describe}
107
108\begin{describe}{plug}{module @<scanner> @<pset>}
109\end{describe}
110
111\begin{describe}{plug}{class-item @<scanner> @<class> @<pset>}
112\end{describe}
113
114\begin{describe}{var}{*builtin-module*}
115\end{describe}
116
117\begin{describe}{fun}{make-builtin-module @> @<module>}
118\end{describe}
119
120%%%----- That's all, folks --------------------------------------------------
121
122%%% Local variables:
123%%% mode: LaTeX
124%%% TeX-master: "sod.tex"
125%%% TeX-PDF-mode: t
126%%% End: