6 die "Usage: $0 <ghc commands> <libdir>\n"
9 my @ghc_commands = split / /, $ARGV[0];
10 my $libdir = $ARGV[1];
13 <?xml version="1.0" encoding="iso-8859-1"?>
14 <!DOCTYPE xsl:stylesheet [
17 <xsl:stylesheet version="1.0"
18 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
19 xmlns="http://www.w3.org/TR/xhtml1/strict">
21 <xsl:output method="text" omit-xml-declaration="yes" />
23 <xsl:template match="/">.\"
24 .\" This is a generated file. Changes might get clobbered. Edit at own's risk.
26 .TH GHC 1 "2002-10-25" "Glasgow FP Suite" "Glasgow Haskell Compiler"
28 GHC \- the Glasgow Haskell Compiler
36 for my $ghc_command (@ghc_commands) {
37 print ".br\n" if $started;
41 .RI [ option | filename ]...
48 This manual page documents briefly the
55 is not yet available on all architectures.
56 Extensive documentation is available in various other formats
57 including DVI, PostScript and HTML; see below.
60 Each of GHC's command line options is classified as either
61 .IR static " or " dynamic .
62 A static flag may only be specified on the command line, whereas a
63 dynamic flag may also be given in an \f(CROPTIONS\fP pragma in a
64 source file or set from the GHCi command-line with \f(CR:set\fP.
66 As a rule of thumb, all the language options are dynamic, as are the
67 warning options and the debugging options.
69 The rest are static, with the notable exceptions of
70 .BR \-v ", " \-cpp ", " \-fasm ", " \-fvia\-C ", and " \-#include .
71 The OPTIONS sections lists the status of each flag.
74 Common suffixes of file names for Haskell are:
77 Haskell source code; preprocess, compile
80 literate Haskell source; unlit, preprocess, compile
83 Interface file; contains information about exported
92 object files; common ways are:
103 <xsl:apply-templates select="sect1/sect2" mode="overview"/>
105 <xsl:apply-templates select="sect1/sect2"/>
115 Copyright 2002, The University Court of the University of Glasgow.
122 This manual page was generated from the XML documentation of GHC with blood,
123 sweat, tears and a breaks-if-you-look-at-it-the-wrong-way XSL
124 stylesheet originally written by Michael Weber <michaelw@debian.org>
125 for the Debian GNU/Linux system (but may be used by others).
131 <xsl:template match="sect1/sect2" mode="overview">
133 <xsl:when test="contains(title/.,' (')">
134 .SS <xsl:value-of select="substring-before(title/.,' (')"/>
137 .SS <xsl:value-of select="title/."/>
141 <xsl:apply-templates select="informaltable/tgroup/tbody/row" mode="overview"/>
146 <xsl:template match="sect1/sect2">
148 <xsl:when test="contains(title/.,' (')">
150 .SH <xsl:value-of select='translate(substring-before(title/.," ("),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")'/>
155 .SH <xsl:value-of select='translate(title/.,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")'/>
158 </xsl:choose><xsl:text>
160 <xsl:apply-templates select="informaltable/tgroup/tbody/row"/>
164 <xsl:template match="informaltable/tgroup/tbody/row" mode="overview">
165 <xsl:apply-templates select="entry[1]|entry[4]" mode="overview"/>
166 <xsl:text> </xsl:text>
169 <xsl:template match="informaltable/tgroup/tbody/row">
171 <xsl:apply-templates select="entry[1]"/><xsl:text>
173 <xsl:variable name="x">
174 <xsl:apply-templates select="entry[2]"/>
176 <xsl:value-of select="normalize-space($x)"/>
178 [<xsl:apply-templates select="entry[3]"/>]
179 <!-- IGNORE NEGATIVE OPTIONS
180 <xsl:if test="not(entry[4]='-')">
183 <xsl:apply-templates select="entry[4]/option"/>
189 <xsl:template match="option" mode="escape-dash">
190 <xsl:variable name="x">
191 <xsl:value-of select="."/>
193 <xsl:variable name="y">
194 <xsl:call-template name="replace-string">
195 <xsl:with-param name="text" select="$x"/>
196 <xsl:with-param name="from" select="'-'"/>
197 <xsl:with-param name="to" select="'\-'"/>
200 <xsl:value-of select="$y"/>
203 <xsl:template match="option" mode="overview">
204 <xsl:apply-templates select="." mode="escape-dash"/>
207 <xsl:template match="option">
208 <xsl:text>\fB</xsl:text>
209 <xsl:apply-templates select="." mode="escape-dash"/>
210 <xsl:text>\fP</xsl:text>
214 <xsl:template match="entry[1]" mode="overview">
215 <xsl:apply-templates mode="overview"/>
216 <xsl:text> </xsl:text>
219 <xsl:template match="entry[1]">
220 <xsl:apply-templates/><xsl:text> </xsl:text>
223 <xsl:template match="entry[4]" mode="overview">
224 <xsl:if test="not(.='-')">
225 <xsl:apply-templates select="option" mode="overview"/>
226 <xsl:text> </xsl:text>
230 <xsl:template match="entry[4]">
231 <xsl:if test="not(.='-')">
232 <xsl:value-of select="."/><xsl:text> </xsl:text>
237 <xsl:template match="replaceable" mode="overview">
238 <xsl:apply-templates select="."/>
241 <xsl:template match="replaceable">
242 <xsl:text>\fI</xsl:text>
243 <xsl:value-of select='.'/>
244 <xsl:text>\fP</xsl:text>
248 <xsl:template match="literal">
249 <xsl:text>\f(CR</xsl:text>
250 <xsl:value-of select="."/>
251 <xsl:text>\fP</xsl:text>
256 <!-- reusable replace-string function -->
257 <xsl:template name="replace-string">
258 <xsl:param name="text"/>
259 <xsl:param name="from"/>
260 <xsl:param name="to"/>
263 <xsl:when test="contains($text, $from)">
265 <xsl:variable name="before" select="substring-before($text, $from)"/>
266 <xsl:variable name="after" select="substring-after($text, $from)"/>
267 <xsl:variable name="prefix" select="concat($before, $to)"/>
269 <xsl:value-of select="$before"/>
270 <xsl:value-of select="$to"/>
271 <xsl:call-template name="replace-string">
272 <xsl:with-param name="text" select="$after"/>
273 <xsl:with-param name="from" select="$from"/>
274 <xsl:with-param name="to" select="$to"/>
278 <xsl:value-of select="$text"/>