[project @ 1996-07-19 18:36:04 by partain]
[ghc-hetmet.git] / ghc / docs / add_to_compiler / paper.verb
1 \documentstyle[11pt,../grasp,code]{article}
2 %\documentstyle[12pt,springer-wcs,oldfontnames,code]{article}
3 \setlength{\marginparwidth}{1.5cm}
4 \setlength{\parskip}{0.25cm}
5 \setlength{\parindent}{0cm}
6 \renewcommand{\textfraction}{0.2}
7 \renewcommand{\floatpagefraction}{0.7}
8 %
9 \newcommand{\freevars}[1]{fvs(#1)}
10 %
11 % to avoid src-location marginpars, comment in/out the out/in defns.
12 %\newcommand{\srcloc}[1]{}
13 %\newcommand{\onlyIfSrcLocs}[1]{}
14 %
15 \newcommand{\onlyIfSrcLocs}[1]{#1}
16 %
17 % Aran Lunzer told me to do this magic:
18 \def\mytightcode{\codeaux{\leftmargin=0pt}}%
19 \let\endmytightcode\endcodeaux
20 % what he told me:
21 %% CODE environment
22 %% ----------------
23 %% To get a single line of spacing above and below a code segment, with
24 %% zero added indention (like a verbatim environment), and consistent appearance
25 %% whether or not you use \codeallowbreaks:
26 %% 
27 %%      \def\code{\codeaux{\leftmargin=0pt}}
28 %% 
29 %% Then for a normal, unbreakable section:
30 %% 
31 %%      \begin{code}
32 %%      first line of code
33 %%      ...
34 %%      last line of code\end{code}
35 %% 
36 %% And for a breakable section:
37 %% 
38 %%      \begin{code}
39 %%      \codeallowbreaks{}first line of code
40 %%      ...
41 %%      last line of code\end{code}
42 %% 
43 %% 
44 %% srcloc marginpars
45 %% -----------------
46 %% 
47 %% To ensure that marginpars appear on the same line as their associated text,
48 %% especially in a description list, add a \mbox{} to their definition:
49 %% 
50 %%      \renewcommand{\srcloc}[1]{\mbox{}\marginpar{\footnotesize\tt #1}}
51 %% 
52 %% This empty mbox doesn't introduce anything visible, but can screw up your
53 %% spacing unless you are careful.  So...
54 %% 
55 %% Usage in a description list:
56 %% 
57 %%      \item[item description:]\srcloc{no spaces around!}%
58 %%      Here is the item text.
59 %% 
60 %% In the middle of a sentence:
61 %% 
62 %%      And now for something\srcloc{completely} different.
63 %% 
64 %% Near a period or colon (MUST come before the punctuation):
65 %% 
66 %%      Hello, good evening, and welcome\srcloc{foo}.  Here is the fnord.
67 %
68 \begin{document}
69 \title{How to Add an Optimisation Pass\\
70 to the Glasgow Haskell compiler\\
71 (two months before version~0.23)}
72 \author{Will Partain, acting as AQUA Project scribe\\
73 e-mail contact: partain@@dcs.glasgow.ac.uk}
74 \renewcommand{\today}{October, 1994}
75 \maketitle
76 % temporarily....
77 \tableofcontents
78 %\clearpage
79 \begin{abstract}
80 A major purpose of the new Glasgow Haskell compiler (written in
81 Haskell) is to be freely available in source form so that others can
82 use it as ``root stock'' onto which they may graft their own wonderful
83 bits.  This document is a field guide for the aspiring
84 better-compiler grower, particularly one who wishes to add an
85 optimisation pass.
86 \end{abstract}
87
88 \onlyIfSrcLocs{Throughout this paper, pointers to the relevant
89 source-code are given in the margins.  This code is in the {\tt
90 ghc/compiler/} part of the distribution; names ending in {\tt /} are
91 directories.  We assume you already know Haskell.}
92
93 % \input{state-of-play}
94
95 \input{overview}
96
97 \input{front-end}
98 \input{back-end}
99
100 \input{core-syntax}
101
102 \input{howto-add}
103
104 %************************************************************************
105 %*                                                                      *
106 \section{For further information}
107 %*                                                                      *
108 %************************************************************************
109
110 Besides the documents listed in the References below, there are
111 several internal compiler documents that come with the GHC
112 distribution\srcloc{ghc/docs/README}.
113
114 If you are hacking GHC, you should be on the @glasgow-haskell-users@
115 mailing list.  Send mail to
116 @glasgow-haskell-users-request@@dcs.glasgow.ac.uk@ to subscribe.
117 You may wish to subscribe to our ``bugs channel'' (
118 @glasgow-haskell-bugs-request@@dcs.glasgow.ac.uk@) as well, if you
119 are a glutton for punishment.
120
121 Further suggestions as to how we can make your job easier will be most
122 appreciated.
123
124 \bibliographystyle{wpplain}   % wpplain, wplong, wpannote, ...
125 \bibliography{wp_abbrevs,comp}
126
127 %\printindex
128 \end{document}