switch to new Haddock-generated library docs
[haskell-report.git] / report / haddock-style.verb
1 % Haddock style sheet
2
3 \newcommand{\haddockbeginheader}{\hrulefill}
4 \newcommand{\haddockendheader}{\hrulefill}
5
6 % a little gap before the ``Methods'' header
7 \newcommand{\haddockpremethods}{\vspace{2ex}}
8
9 % inserted before \\begin{verbatim}
10 \newcommand{\haddockverb}{\small}
11
12 % an identifier: we add an index entry
13 \newcommand{\haddockid}[1]{\haddocktt{#1}\indextt{#1}}
14
15 % \newcommand{\haddockbeginconstrs}{\vspace{-2ex}\begin{tabular}{llp{4in}}}
16 \newcommand{\haddockbeginconstrs}{\begin{tabular}{@@{}llp{4in}}}
17 \newcommand{\haddockendconstrs}{\end{tabular}}
18
19 \newcommand{\haddockbeginargs}{\begin{tabular}{@@{}llp{4in}}}
20 \newcommand{\haddockendargs}{\end{tabular}}
21
22 \newcommand{\haddocktt}[1]{{\small \texttt{#1}}}
23 \newcommand{\haddockdecltt}[1]{{\small\bfseries \texttt{#1}}}
24
25 \makeatletter
26 \newenvironment{haddockdesc}
27                {\list{}{\labelwidth\z@@ \itemindent-\leftmargin
28                         \let\makelabel\haddocklabel}}
29                {\endlist}
30 \newcommand*\haddocklabel[1]{\hspace\labelsep\haddockdecltt{#1}}
31 \makeatother
32
33 % after a declaration, start a new line for the documentation.
34 % Otherwise, the documentation starts right after the declaration,
35 % because we're using the list environment and the declaration is the
36 % ``label''.  I tried making this newline part of the label, but
37 % couldn't get that to work reliably (the space seemed to stretch
38 % sometimes).
39 \newcommand{\haddockbegindoc}{\hfill\\[1ex]}