[project @ 2000-04-14 09:37:03 by simonmar]
[ghc-hetmet.git] / ghc / docs / users_guide / utils.sgml
index da61187..21cae2a 100644 (file)
@@ -10,7 +10,7 @@ with the Great Haskell Programming Task.
 </Para>
 
 <Sect1 id="mkdependHS">
-<Title>Makefile dependencies in Haskell: using <Literal>mkdependHS</Literal>
+<Title>Makefile dependencies in Haskell: using <Command>mkdependHS</Command>
 </Title>
 
 <Para>
@@ -20,7 +20,7 @@ with the Great Haskell Programming Task.
 </Para>
 
 <Para>
-You run <Literal>mkdependHS</Literal> like this:
+You run <Command>mkdependHS</Command> like this:
 
 <Screen>
 mkdependHS [mkdependHS options] [-- GHC options --] srcfile1 [srcfile2 ...]
@@ -32,8 +32,8 @@ or
 ghc -M [mkdependHS options(prefix with -optdep)] [ GHC options ] srcfile1 [srcfile2 ...]
 </Screen>
 
-To see <Literal>mkdependHS</Literal>'s command-line flags, give it a duff flag,
-e.g., <Literal>mkdependHS -help</Literal>.
+To see <Command>mkdependHS</Command>'s command-line flags, give it a duff flag,
+e.g., <Command>mkdependHS -help</Command>.
 </Para>
 
 <Para>
@@ -43,7 +43,7 @@ In general, if module <Literal>A</Literal> contains the line
 import B ...blah...
 </ProgramListing>
 
-then <Literal>mkdependHS</Literal> will generate a dependency line of the form:
+then <Command>mkdependHS</Command> will generate a dependency line of the form:
 
 <ProgramListing>
 A.o : B.hi
@@ -55,36 +55,36 @@ If module <Literal>A</Literal> contains the line
 import {-# SOURCE #-} B ...blah...
 </ProgramListing>
 
-then <Literal>mkdependHS</Literal> will generate a dependency line of the form:
+then <Command>mkdependHS</Command> will generate a dependency line of the form:
 
 <ProgramListing>
 A.o : B.hi-boot
 </ProgramListing>
 
 (See <XRef LinkEnd="hi-files"> for details of interface files.)
-If <Literal>A</Literal> imports multiple modules, then there will be multiple lines with <Literal>A.o</Literal> as the
+If <Literal>A</Literal> imports multiple modules, then there will be multiple lines with <Filename>A.o</Filename> as the
 target.
 </Para>
 
 <Para>
-By default, <Literal>mkdependHS</Literal> generates all the dependencies, and then
+By default, <Command>mkdependHS</Command> generates all the dependencies, and then
 concatenates them onto the end of
-<Literal>makefile</Literal> (or <Literal>Makefile</Literal> if <Literal>makefile</Literal> doesn't exist) bracketed by
+<Filename>makefile</Filename> (or <Filename>Makefile</Filename> if <Filename>makefile</Filename> doesn't exist) bracketed by
 the lines "<Literal>&num; DO NOT DELETE: Beginning of Haskell dependencies</Literal>" and
 "<Literal>&num; DO NOT DELETE: End of Haskell dependencies</Literal>".  If these lines
-already exist in the <Literal>makefile</Literal>, <Literal>mkdependHS</Literal> deletes the old
+already exist in the <Filename>makefile</Filename>, <Command>mkdependHS</Command> deletes the old
 dependencies first.
 </Para>
 
 <Para>
-<Literal>mkdependHS</Literal> takes GHC options between <Literal>--</Literal> brackets.
+<Command>mkdependHS</Command> takes GHC options between <Literal>--</Literal> brackets.
 It understands the following ones. Any options between <Literal>--</Literal> brackets
 that it doesn't understand are simply ignored; this way you can feed your
-Makefile's standard GHC options to <Literal>mkdependHS</Literal> un-filtered.
+Makefile's standard GHC options to <Command>mkdependHS</Command> un-filtered.
 <VariableList>
 
 <VarListEntry>
-<Term><Literal>-cpp</Literal></Term>
+<Term><Option>-cpp</Option></Term>
 <ListItem>
 <Para>
 Run the C pre-processor over the input files. The
@@ -93,33 +93,33 @@ default is not to.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-D&lt;blah&gt;</Literal></Term>
+<Term><Option>-D&lt;blah&gt;</Option></Term>
 <ListItem>
 <Para>
-A cpp <Literal>&num;define</Literal>; usual meaning.
+A cpp <Option>&num;define</Option>; usual meaning.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-i&lt;dirs&gt;</Literal></Term>
+<Term><Option>-i&lt;dirs&gt;</Option></Term>
 <ListItem>
 <Para>
-Add <Literal>&lt;dirs&gt;</Literal> (colon-separated) to list of directories
+Add <Filename>&lt;dirs&gt;</Filename> (colon-separated) to list of directories
 to search for "import"ed modules.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-I&lt;dir&gt;</Literal></Term>
+<Term><Option>-I&lt;dir&gt;</Option></Term>
 <ListItem>
 <Para>
-Add <Literal>&lt;dir&gt;</Literal> to list of directories to search for
+Add <Filename>&lt;dir&gt;</Filename> to list of directories to search for
 .h files (i.e., usual meaning).
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-syslib &lt;blah&gt;</Literal></Term>
+<Term><Option>-syslib &lt;blah&gt;</Option></Term>
 <ListItem>
 <Para>
 This program uses this GHC system library; take
@@ -132,11 +132,11 @@ appropriate action (e.g., recognise when they are
 </Para>
 
 <Para>
-Here are the <Literal>mkdependHS</Literal>-specific options (not between <Literal>--</Literal>'s):
+Here are the <Command>mkdependHS</Command>-specific options (not between <Literal>--</Literal>'s):
 <VariableList>
 
 <VarListEntry>
-<Term><Literal>-v</Literal></Term>
+<Term><Option>-v</Option></Term>
 <ListItem>
 <Para>
 Be verbose.
@@ -144,7 +144,7 @@ Be verbose.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-v -v</Literal></Term>
+<Term><Option>-v -v</Option></Term>
 <ListItem>
 <Para>
 Be very verbose.
@@ -152,7 +152,7 @@ Be very verbose.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-w</Literal></Term>
+<Term><Option>-w</Option></Term>
 <ListItem>
 <Para>
 Turn off warnings about interface file shadowing.
@@ -160,92 +160,92 @@ Turn off warnings about interface file shadowing.
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-f blah</Literal></Term>
+<Term><Option>-f blah</Option></Term>
 <ListItem>
 <Para>
-Use <Literal>blah</Literal> as the makefile, rather than <Literal>makefile</Literal>
-or <Literal>Makefile</Literal>.  If <Literal>blah</Literal> doesn't exist, <Literal>mkdependHS</Literal> creates it.
-We often use <Literal>-f .depend</Literal> to put the dependencies in <Literal>.depend</Literal> and
-then <Literal>include</Literal> the file <Literal>.depend</Literal> into <Literal>Makefilpe</Literal>.
+Use <Filename>blah</Filename> as the makefile, rather than <Filename>makefile</Filename>
+or <Filename>Makefile</Filename>.  If <Filename>blah</Filename> doesn't exist, <Command>mkdependHS</Command> creates it.
+We often use <Option>-f .depend</Option> to put the dependencies in <Filename>.depend</Filename> and
+then <Command>include</Command> the file <Filename>.depend</Filename> into <Filename>Makefile</Filename>.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-o &lt;osuf&gt;</Literal></Term>
+<Term><Option>-o &lt;osuf&gt;</Option></Term>
 <ListItem>
 <Para>
-Use <Literal>.&lt;osuf&gt;</Literal> as the "target file" suffix ( default: <Literal>o</Literal>).
-Multiple <Literal>-o</Literal> flags are permitted (GHC2.05 onwards).  Thus "<Literal>-o hc -o o</Literal>"
-will generate dependencies for <Literal>.hc</Literal> and <Literal>.o</Literal> files.
+Use <Filename>.&lt;osuf&gt;</Filename> as the "target file" suffix ( default: <Literal>o</Literal>).
+Multiple <Option>-o</Option> flags are permitted (GHC2.05 onwards).  Thus "<Option>-o hc -o o</Option>"
+will generate dependencies for <Filename>.hc</Filename> and <Filename>.o</Filename> files.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-s &lt;suf&gt;</Literal></Term>
+<Term><Option>-s &lt;suf&gt;</Option></Term>
 <ListItem>
 <Para>
 Make extra dependencies that declare that files with
-suffix <Literal>.&lt;suf&gt;&lowbar;&lt;osuf&gt;</Literal> depend on interface files with suffix <Literal>.&lt;suf&gt;&lowbar;hi</Literal>, or
-(for <Literal>&lcub;-&num; SOURCE &num;-&rcub;</Literal> imports) on <Literal>.hi-boot</Literal>.
-Multiple <Literal>-s</Literal> flags are permitted.
-For example, "<Literal>-o hc -s a -s b</Literal>" will
-make dependencies for <Literal>.hc</Literal> on <Literal>.hi</Literal>, <Literal>.a&lowbar;hc</Literal> on <Literal>.a&lowbar;hi</Literal>, and <Literal>.b&lowbar;hc</Literal> on <Literal>.b&lowbar;hi</Literal>.
+suffix <Filename>.&lt;suf&gt;&lowbar;&lt;osuf&gt;</Filename> depend on interface files with suffix <Filename>.&lt;suf&gt;&lowbar;hi</Filename>, or
+(for <Literal>&lcub;-&num; SOURCE &num;-&rcub;</Literal> imports) on <Filename>.hi-boot</Filename>.
+Multiple <Option>-s</Option> flags are permitted.
+For example, <Option>-o hc -s a -s b</Option> will
+make dependencies for <Filename>.hc</Filename> on <Filename>.hi</Filename>, <Filename>.a&lowbar;hc</Filename> on <Filename>.a&lowbar;hi</Filename>, and <Filename>.b&lowbar;hc</Filename> on <Filename>.b&lowbar;hi</Filename>.
 (Useful in conjunction with NoFib "ways".)  
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>--exclude-module=&lt;file&gt;</Literal></Term>
+<Term><Option>--exclude-module=&lt;file&gt;</Option></Term>
 <ListItem>
 <Para>
-Regard <Literal>&lt;file&gt;</Literal> as "stable"; i.e., exclude it from having
+Regard <Filename>&lt;file&gt;</Filename> as "stable"; i.e., exclude it from having
 dependencies on it.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-x</Literal></Term>
+<Term><Option>-x</Option></Term>
 <ListItem>
 <Para>
-same as <Literal>--exclude-module</Literal>
+same as <Option>--exclude-module</Option>
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>--exclude-directory=&lt;dirs&gt;</Literal></Term>
+<Term><Option>--exclude-directory=&lt;dirs&gt;</Option></Term>
 <ListItem>
 <Para>
-Regard the colon-separated list of directories <Literal>&lt;dirs&gt;</Literal> as containing stable,
+Regard the colon-separated list of directories <Filename>&lt;dirs&gt;</Filename> as containing stable,
 don't generate any dependencies on modules therein.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>-Xdirs</Literal></Term>
+<Term><Option>-Xdirs</Option></Term>
 <ListItem>
 <Para>
-same as <Literal>--exclude-directory</Literal>.
+same as <Option>--exclude-directory</Option>.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>--include-module=&lt;file&gt;</Literal></Term>
+<Term><Option>--include-module=&lt;file&gt;</Option></Term>
 <ListItem>
 <Para>
-Regard <Literal>&lt;file&gt;</Literal> as not "stable"; i.e., generate dependencies
+Regard <Filename>&lt;file&gt;</Filename> as not "stable"; i.e., generate dependencies
 on it (if any). This option is normally used in conjunction 
-with the <Literal>--exclude-directory</Literal> option.
+with the <Option>--exclude-directory</Option> option.
 </Para>
 </ListItem>
 </VarListEntry>
 <VarListEntry>
-<Term><Literal>--include-prelude</Literal></Term>
+<Term><Option>--include-prelude</Option></Term>
 <ListItem>
 <Para>
 Regard prelude libraries as unstable, i.e., generate dependencies
 on the prelude modules used (including <Literal>Prelude</Literal>).
 This option is normally only used by the various system libraries. If
-a <Literal>-syslib</Literal> option is used, dependencies will also be
+a <Option>-syslib</Option> option is used, dependencies will also be
 generated on the library's interfaces. 
 </Para>
 </ListItem>
@@ -256,7 +256,7 @@ generated on the library's interfaces.
 </Sect1>
 
 <Sect1 id="hstags">
-<Title>Emacs `TAGS' for Haskell: <Literal>hstags</Literal>
+<Title>Emacs `TAGS' for Haskell: <Command>hstags</Command>
 </Title>
 
 <Para>
@@ -271,13 +271,13 @@ that index to jump around among these definitions.
 </Para>
 
 <Para>
-Rather than scratch your head, saying ``Now where did we define
-`foo'?'', you just do (in Emacs) <Literal>M-. foo RET</Literal>, and You're There!
+Rather than scratch your head, saying &ldquo;Now where did we define
+`foo'?&rdquo;, you just do (in Emacs) <Literal>M-. foo RET</Literal>, and You're There!
 Some people go wild over this stuff&hellip;
 </Para>
 
 <Para>
-GHC comes with a program <Literal>hstags</Literal>, which build Emacs-able TAGS files.  The invocation syntax is:
+GHC comes with a program <Command>hstags</Command>, which build Emacs-able TAGS files.  The invocation syntax is:
 
 <Screen>
 hstags [GHC-options] file [files...]
@@ -298,8 +298,8 @@ tags:
 </Para>
 
 <Para>
-The only flags of its own are: <Literal>-v</Literal> to be verbose; <Literal>-a</Literal> to
-**APPEND** to the TAGS file, rather than write to it.
+The only flags of its own are: <Option>-v</Option> to be verbose; <Option>-a</Option> to
+<Emphasis>APPEND</Emphasis> to the TAGS file, rather than write to it.
 </Para>
 
 <Para>
@@ -310,16 +310,16 @@ in.  Go for the corresponding type constructor instead.
 </Para>
 
 <Para>
-(Actually, GHC also comes with <Literal>etags</Literal> &lsqb;for C&rsqb;, and <Literal>perltags</Literal>
+(Actually, GHC also comes with <Command>etags</Command> &lsqb;for C&rsqb;, and <Command>perltags</Command>
 &lsqb;for You Know What&rsqb;.  And&mdash;I cannot tell a lie&mdash;there is Denis
-Howe's <Literal>fptags</Literal> &lsqb;for Haskell, etc.&rsqb; in the <Literal>ghc/CONTRIB</Literal>
+Howe's <Command>fptags</Command> &lsqb;for Haskell, etc.&rsqb; in the <Filename>ghc/CONTRIB</Filename>
 section&hellip;)
 </Para>
 
 </Sect1>
 
 <Sect1 id="happy">
-<Title>``Yacc for Haskell'': <Literal>happy</Literal>
+<Title>&ldquo;Yacc for Haskell&rdquo;: <Command>happy</Command>
 </Title>
 
 <Para>
@@ -327,23 +327,23 @@ section&hellip;)
 <IndexTerm><Primary>Yacc for Haskell</Primary></IndexTerm>
 <IndexTerm><Primary>parser generator for Haskell</Primary></IndexTerm>
 Andy Gill and Simon Marlow have written a parser-generator for
-Haskell, called <Literal>happy</Literal>.<IndexTerm><Primary>happy parser generator</Primary></IndexTerm> <Literal>Happy</Literal>
-is to Haskell what <Literal>Yacc</Literal> is to C.
+Haskell, called <Command>happy</Command>.<IndexTerm><Primary>happy parser generator</Primary></IndexTerm> <Command>Happy</Command>
+is to Haskell what <Command>Yacc</Command> is to C.
 </Para>
 
 <Para>
-You can get <Literal>happy</Literal> by FTP from <Literal>ftp.dcs.gla.ac.uk</Literal> in
-<Literal>pub/haskell/happy</Literal>, the file <Literal>happy-1.5-src.tar.gz</Literal>.
+You can get <Command>happy</Command> by FTP from <Literal>ftp.dcs.gla.ac.uk</Literal> in
+<Filename>pub/haskell/happy</Filename>, the file <Filename>happy-1.5-src.tar.gz</Filename>.
 </Para>
 
 <Para>
-<Literal>Happy</Literal> is at its shining best when compiled by GHC.
+<Command>Happy</Command> is at its shining best when compiled by GHC.
 </Para>
 
 </Sect1>
 
 <Sect1 id="pphs">
-<Title>Pretty-printing Haskell: <Literal>pphs</Literal>
+<Title>Pretty-printing Haskell: <Command>pphs</Command>
 </Title>
 
 <Para>
@@ -353,7 +353,7 @@ You can get <Literal>happy</Literal> by FTP from <Literal>ftp.dcs.gla.ac.uk</Lit
 
 <Para>
 Andrew Preece has written
-<Literal>pphs</Literal>,<IndexTerm><Primary>pphs</Primary></IndexTerm><IndexTerm><Primary>pretty-printing Haskell</Primary></IndexTerm>
+<Command>pphs</Command>,<IndexTerm><Primary>pphs</Primary></IndexTerm><IndexTerm><Primary>pretty-printing Haskell</Primary></IndexTerm>
 a utility to pretty-print Haskell code in LaTeX documents.
 Keywords in bolds, variables in italics&mdash;that sort of thing.  It is
 good at lining up program clauses and equals signs, things that are
@@ -361,7 +361,7 @@ very tiresome to do by hand.
 </Para>
 
 <Para>
-The code is distributed with GHC in <Literal>ghc/CONTRIB/pphs</Literal>.
+The code is distributed with GHC in <Filename>ghc/CONTRIB/pphs</Filename>.
 </Para>
 
 </Sect1>