\documentstyle[11pt,../grasp,code]{article} %\documentstyle[12pt,springer-wcs,oldfontnames,code]{article} \setlength{\marginparwidth}{1.5cm} \setlength{\parskip}{0.25cm} \setlength{\parindent}{0cm} \renewcommand{\textfraction}{0.2} \renewcommand{\floatpagefraction}{0.7} % \newcommand{\freevars}[1]{fvs(#1)} % % to avoid src-location marginpars, comment in/out the out/in defns. %\newcommand{\srcloc}[1]{} %\newcommand{\onlyIfSrcLocs}[1]{} % \newcommand{\onlyIfSrcLocs}[1]{#1} % % Aran Lunzer told me to do this magic: \def\mytightcode{\codeaux{\leftmargin=0pt}}% \let\endmytightcode\endcodeaux % what he told me: %% CODE environment %% ---------------- %% To get a single line of spacing above and below a code segment, with %% zero added indention (like a verbatim environment), and consistent appearance %% whether or not you use \codeallowbreaks: %% %% \def\code{\codeaux{\leftmargin=0pt}} %% %% Then for a normal, unbreakable section: %% %% \begin{code} %% first line of code %% ... %% last line of code\end{code} %% %% And for a breakable section: %% %% \begin{code} %% \codeallowbreaks{}first line of code %% ... %% last line of code\end{code} %% %% %% srcloc marginpars %% ----------------- %% %% To ensure that marginpars appear on the same line as their associated text, %% especially in a description list, add a \mbox{} to their definition: %% %% \renewcommand{\srcloc}[1]{\mbox{}\marginpar{\footnotesize\tt #1}} %% %% This empty mbox doesn't introduce anything visible, but can screw up your %% spacing unless you are careful. So... %% %% Usage in a description list: %% %% \item[item description:]\srcloc{no spaces around!}% %% Here is the item text. %% %% In the middle of a sentence: %% %% And now for something\srcloc{completely} different. %% %% Near a period or colon (MUST come before the punctuation): %% %% Hello, good evening, and welcome\srcloc{foo}. Here is the fnord. % \begin{document} \title{How to Add an Optimisation Pass\\ to the Glasgow Haskell compiler\\ (two months before version~0.23)} \author{Will Partain, acting as AQUA Project scribe\\ e-mail contact: partain@@dcs.glasgow.ac.uk} \renewcommand{\today}{October, 1994} \maketitle % temporarily.... \tableofcontents %\clearpage \begin{abstract} A major purpose of the new Glasgow Haskell compiler (written in Haskell) is to be freely available in source form so that others can use it as ``root stock'' onto which they may graft their own wonderful bits. This document is a field guide for the aspiring better-compiler grower, particularly one who wishes to add an optimisation pass. \end{abstract} \onlyIfSrcLocs{Throughout this paper, pointers to the relevant source-code are given in the margins. This code is in the {\tt ghc/compiler/} part of the distribution; names ending in {\tt /} are directories. We assume you already know Haskell.} % \input{state-of-play} \input{overview} \input{front-end} \input{back-end} \input{core-syntax} \input{howto-add} %************************************************************************ %* * \section{For further information} %* * %************************************************************************ Besides the documents listed in the References below, there are several internal compiler documents that come with the GHC distribution\srcloc{ghc/docs/README}. If you are hacking GHC, you should be on the @glasgow-haskell-users@ mailing list. Send mail to @glasgow-haskell-users-request@@dcs.glasgow.ac.uk@ to subscribe. You may wish to subscribe to our ``bugs channel'' ( @glasgow-haskell-bugs-request@@dcs.glasgow.ac.uk@) as well, if you are a glutton for punishment. Further suggestions as to how we can make your job easier will be most appreciated. \bibliographystyle{wpplain} % wpplain, wplong, wpannote, ... \bibliography{wp_abbrevs,comp} %\printindex \end{document}