| 1 |
How stuff is documented |
| 2 |
======================= |
| 3 |
|
| 4 |
License |
| 5 |
------- |
| 6 |
|
| 7 |
Even though not explicitly specified, all documentation is provided under the |
| 8 |
same license as the code it applies to. This is currently the Affero GNU |
| 9 |
Public License, version 3 or later. See the license headers in the source |
| 10 |
files and the license itself (file COPYING) for details. |
| 11 |
|
| 12 |
|
| 13 |
Modularisation |
| 14 |
-------------- |
| 15 |
|
| 16 |
Documentation may be found in: |
| 17 |
|
| 18 |
* Code |
| 19 |
* General |
| 20 |
* A common license header is to be placed at the head of any non-trivial |
| 21 |
source file. |
| 22 |
* Haskell |
| 23 |
* Haskell code should be enriched with Haddock documentation, ideally at |
| 24 |
least each exported function and datatype (et al.) of a module. |
| 25 |
* Modules should be split into a hierarchichal structure. |
| 26 |
* Sed |
| 27 |
|
| 28 |
* Explicit documentation files |
| 29 |
* General |
| 30 |
* Documentation should be split into several usually small files, |
| 31 |
according to the discussed topic. |
| 32 |
* Files should be named in a hierarchical manner, using dots (<.>) as |
| 33 |
separators. E.g. "syntax.slashes". |
| 34 |
* Note: This convention might change later towards using directories |
| 35 |
as a means to reflect hierarchy. |
| 36 |
* doc/ |
| 37 |
* Contains any documentation on the how and why. It contrasts to in-code |
| 38 |
documentation by adressing the more abstract issues. |
| 39 |
* Its files should be well structured, as desribed later. |
| 40 |
* It should contain only few questions and TODO annotations. |
| 41 |
* doc/partial/ |
| 42 |
* Less well structured or rather incomplete documentation. |
| 43 |
* doc/examples/ |
| 44 |
* Small (Ding) examples. |
| 45 |
* doc/thesis.pdf |
| 46 |
* Bachelor's thesis explicating this program. |
| 47 |
* todo/ |
| 48 |
* Contains documentation on steps that remain to be taken and problems |
| 49 |
that remain to be solved. It does in particular allow for the |
| 50 |
discussion of options and stating of questions. |
| 51 |
* A file's structure requires less strictness to allow for the likely |
| 52 |
frequent additions, changes and restructuring. |
| 53 |
* Files in todo/ should end up in doc/ when all is done. |
| 54 |
* If instead, it was decided not to pursue something further, either |
| 55 |
should the reasons be documented, or else the corresponding file in |
| 56 |
todo/ moved to todo/old/. |
| 57 |
* It may be a good idea to split off parts of a todo file into a file |
| 58 |
under doc/. |
| 59 |
* todo/old/ |
| 60 |
* No-more-todo, not considered worthy of conversion to proper |
| 61 |
documentation, but nonetheless not to be binned. |
| 62 |
|
| 63 |
|
| 64 |
Syntax & Semantics |
| 65 |
------------------ |
| 66 |
|
| 67 |
* Applying to all documentation: |
| 68 |
* Things should be usually specified in hierarchical lists, like in this |
| 69 |
file. |
| 70 |
* There are valid exceptions, e.g. detailed explanations in doc/. |
| 71 |
* Lists may use any special char as bullet point. In particular, these |
| 72 |
may be mixed. |
| 73 |
* The semantic of particular bullet point characters should be specified |
| 74 |
here. |
| 75 |
* Indentation: Like in this file. |
| 76 |
* <?> Question, uncertainty. |
| 77 |
* <.> Fact. |
| 78 |
* <-> Common. |
| 79 |
* Annotates a point that has the prevalent meaning in the context. |
| 80 |
* E.g., in todo files, this indicates a thing to be done. |
| 81 |
* May also be used as generic bullet point. |
| 82 |
* '>' Quote. |
| 83 |
* </> Filename. |
| 84 |
* <*> Generic. |
| 85 |
* Prefer full phrases. |
| 86 |
* Use terminating periods (<.>). |
| 87 |
* 79 character limit. |
| 88 |
* Emphasis |
| 89 |
* Use '<' and '>', or paired <'> to highlight single characters. |
| 90 |
* use <`> and <'> in this order to highlight single words, e.g. |
| 91 |
identifiers. |
| 92 |
* Use paired <"> to highlight examples of data or code (excluding single |
| 93 |
elements, e.g. identifiers). |
| 94 |
|
| 95 |
* Applying to separate documentation primarily: |
| 96 |
* Headings should be underlined using `=' and `-' for primary and secondary |
| 97 |
headings, respectively. |
| 98 |
* Third level headings are a sign of a too large documentation file (like |
| 99 |
this). |
| 100 |
|
| 101 |
* Applying to separate documentation only: |
| 102 |
* A file should begin with a primary heading, roughly corresponding to the |
| 103 |
file name. |
| 104 |
|
| 105 |
* Applying to in-code documentation mostly: |
| 106 |
* Notes should be typeset as either "Note: <note>", or "Notes:" followed |
| 107 |
by an indented list. See above for the format of a list. |
| 108 |
|
| 109 |
* Applying to in-code documentation only: |
| 110 |
* Documentation must not be within the same comment section as the license |
| 111 |
header. (This excludes a small statement at the top of that header.) |
| 112 |
|
| 113 |
|
| 114 |
Final notes |
| 115 |
----------- |
| 116 |
|
| 117 |
* This is not Markdown syntax. |
| 118 |
* This is quite incomplete. |
| 119 |
* The present documentation does not adhere very closely to the above rules. |