From bca101d9dccaafa4ec3656b917093fcb8259f520 Mon Sep 17 00:00:00 2001
From: Mark Wooding <mdw@distorted.org.uk>
Date: Tue, 22 Sep 2015 11:27:11 +0100
Subject: [PATCH] doc/: More Lisp synopses.

These might be done now, in fact.
---
 doc/Makefile.am |   2 +-
 doc/module.tex  | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/output.tex  |  38 +++++++++++++++++
 3 files changed, 165 insertions(+), 1 deletion(-)
 create mode 100644 doc/module.tex

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 98533c5..a6894be 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -57,7 +57,7 @@ TEX_FILES		+= parsing.tex
 TEX_FILES		+= clang.tex
 TEX_FILES		+= meta.tex
 TEX_FILES		+= layout.tex
-##TEX_FILES		+= module.tex
+TEX_FILES		+= module.tex
 TEX_FILES		+= output.tex
 
 ## Other hacks.
diff --git a/doc/module.tex b/doc/module.tex
new file mode 100644
index 0000000..2769b41
--- /dev/null
+++ b/doc/module.tex
@@ -0,0 +1,126 @@
+%%% -*-latex-*-
+%%%
+%%% Modules
+%%%
+%%% (c) 2015 Straylight/Edgeware
+%%%
+
+%%%----- Licensing notice ---------------------------------------------------
+%%%
+%%% This file is part of the Sensble Object Design, an object system for C.
+%%%
+%%% SOD is free software; you can redistribute it and/or modify
+%%% it under the terms of the GNU General Public License as published by
+%%% the Free Software Foundation; either version 2 of the License, or
+%%% (at your option) any later version.
+%%%
+%%% SOD is distributed in the hope that it will be useful,
+%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
+%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%%% GNU General Public License for more details.
+%%%
+%%% You should have received a copy of the GNU General Public License
+%%% along with SOD; if not, write to the Free Software Foundation,
+%%% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+\chapter{Modules} \label{ch:module}
+
+%%%--------------------------------------------------------------------------
+
+\begin{describe}{fun}{add-module-binding @<symbol> @<thunk>}
+\end{describe}
+
+\begin{describe}{mac}{define-module-var @<name> @<value-form> @<doc-string>}
+\end{describe}
+
+\begin{describe}{mac}
+    {with-module-environment (@[@<module>@]) @<declaration>^* @<form>^*}
+\end{describe}
+
+\begin{describe}{fun}{add-clear-the-decks-function @<symbol> @<thunk>}
+\end{describe}
+
+\begin{describe}{mac}
+  {define-clear-the-decks @<symbol>
+    @[[ @<declaration>^* @! @<doc-string> @]]
+    @<form>^*}
+\end{describe}
+
+\begin{describe}{cls}
+    {module () \&key :name :pset :items :dependencies :variables :state}
+\end{describe}
+
+\begin{describe*}
+    {\dhead{gf}{module-name @<module> @> @<pathname>}
+     \dhead{gf}{module-pset @<module> @> @<pset>}
+     \dhead{gf}{module-items @<module> @> @<list>}
+     \dhead{gf}{module-dependencies @<module> @> @<list>}
+     \dhead{gf}{module-state @<module> @> @<keyword>}}
+\end{describe*}
+
+\begin{describe}{var}{*module*}
+\end{describe}
+
+\begin{describe}{gf}{module-import @<object>}
+\end{describe}
+
+\begin{describe}{gf}{add-to-module @<module> @<item>}
+\end{describe}
+
+\begin{describe}{gf}{finalize-module @<module>}
+\end{describe}
+
+\begin{describe}{mac}
+    {define-module
+        (@<name> @[[ :truename @<pathname> @! :location @<floc> @]])
+      @<declaration>^*
+      @<form>^*
+     \nlret @<module>}
+\end{describe}
+
+\begin{describe}{mac}{with-temporary-module () @<declaration>^* @<body>^*}
+\end{describe}
+
+\begin{describe}{cls}{type-item () \&key :name}
+\end{describe}
+
+\begin{describe}{cls}
+    {code-fragment-item () \&key :fragment :reason :name :constraints}
+\end{describe}
+
+\begin{describe*}
+    {\dhead{gf}{code-fragment @<fragment-item> @> @<fragment>}
+     \dhead{gf}{code-fragment-name @<fragment-item> @> @<name>}
+     \dhead{gf}{code-fragment-reason @<fragment-item> @> @<keyword>}
+     \dhead{gf}{code-fragment-constraints @<fragment-item> @> @<list>}}
+\end{describe*}
+
+\begin{describe}{var}{*module-dirs*}
+\end{describe}
+
+\begin{describe}{fun}{find-file @<scanner> @<name> @<what> @<thunk>}
+\end{describe}
+
+\begin{describe}{fun}
+    {read-module @<pathname> \&key :truename :location @> @<module>}
+\end{describe}
+
+\begin{describe}{plug}{module @<scanner> @<pset>}
+\end{describe}
+
+\begin{describe}{plug}{class-item @<scanner> @<class> @<pset>}
+\end{describe}
+
+\begin{describe}{var}{*builtin-module*}
+\end{describe}
+
+\begin{describe}{fun}{make-builtin-module @> @<module>}
+\end{describe}
+
+%%%----- That's all, folks --------------------------------------------------
+
+%%% Local variables:
+%%% mode: LaTeX
+%%% TeX-master: "sod.tex"
+%%% TeX-PDF-mode: t
+%%% End:
diff --git a/doc/output.tex b/doc/output.tex
index 29a8b4d..5247dc0 100644
--- a/doc/output.tex
+++ b/doc/output.tex
@@ -27,6 +27,44 @@
 
 %%%--------------------------------------------------------------------------
 
+\begin{describe}{cls}{sequencer-item}
+\end{describe}
+
+\begin{describe}{fun}{sequencer-item-p @<object> @> @<generalized-boolean>}
+\end{describe}
+
+\begin{describe}{fun}{make-sequencer-item @<name> \&optional @<functions>}
+\end{describe}
+
+\begin{describe*}
+    {\dhead{fun}{sequencer-item-name @<item> @> @<name>}
+     \dhead{fun}{sequencer-item-functions @<item> @> @<list>}
+     \dhead{fun}{setf (sequencer-item-functions @<item>) @<list>}}
+\end{describe*}
+
+\begin{describe}{cls}{sequencer () \&key :constraints}
+\end{describe}
+
+\begin{describe}{fun}{ensure-sequencer-item @<sequencer> @<name> @> @<item>}
+\end{describe}
+
+\begin{describe}{fun}{add-sequencer-constraint @<sequencer> @<constraint>}
+\end{describe}
+
+\begin{describe}{fun}
+    {invoke-sequencer-items @<sequencer> \&rest @<arguments>}
+\end{describe}
+
+\begin{describe}{gf}{hook-output @<object> @<reason> @<sequencer>}
+\end{describe}
+
+\begin{describe}{mac}
+    {sequence-output (@<stream-var> @<sequencer>) \\ \ind
+      @{ :constraint (@<item-name>^*) @} \\
+      @{ (@<item-name> @<form>^*) @}^*}
+\end{describe}
+
+
 %% output for `h' files
 %%
 %% prologue
-- 
2.11.0

