Commit 74a800bc authored by ian@well-typed.com's avatar ian@well-typed.com

Use consistent dashes in the user guide

We were using a mixture of "––" and "--". We now
consistently use "--", which has the advantage that copy/pasting
flags will work.
parent 0cb19bc4
......@@ -274,7 +274,7 @@ extern HsInt foo(HsInt a0);</programlisting>
<filename>M_stub.o</filename> in the final link command line, or
you'll get link errors for the missing function(s) (this isn't
necessary when building your program with <literal>ghc
&ndash;&ndash;make</literal>, as GHC will automatically link in the
--make</literal>, as GHC will automatically link in the
correct bits).</para>
<sect3 id="using-own-main">
......
......@@ -54,37 +54,37 @@
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;supported-extensions</option> or <option>&ndash;&ndash;supported-languages</option></entry>
<entry><option>--supported-extensions</option> or <option>--supported-languages</option></entry>
<entry>display the supported languages and language extensions</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;show-options</option></entry>
<entry><option>--show-options</option></entry>
<entry>display the supported command line options</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;info</option></entry>
<entry><option>--info</option></entry>
<entry>display information about the compiler</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;version</option></entry>
<entry><option>--version</option></entry>
<entry>display GHC version</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;numeric-version</option></entry>
<entry><option>--numeric-version</option></entry>
<entry>display GHC version (numeric only)</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>&ndash;&ndash;print-libdir</option></entry>
<entry><option>--print-libdir</option></entry>
<entry>display GHC library directory</entry>
<entry>mode</entry>
<entry>-</entry>
......
......@@ -161,7 +161,7 @@ Ok, modules loaded: Main.
<para>or it can be set using the <literal>:set</literal> command
from within GHCi (see <xref
linkend="ghci-cmd-line-options"/>)<footnote><para>Note that in
GHCi, and <option>&ndash;&ndash;make</option> mode, the <option>-i</option>
GHCi, and <option>--make</option> mode, the <option>-i</option>
option is used to specify the search path for
<emphasis>source</emphasis> files, whereas in standard
batch-compilation mode the <option>-i</option> option is used to
......@@ -338,7 +338,7 @@ Compiling A ( A.hs, interpreted )
<para>HINT: since GHCi will only use a compiled object file if it
can be sure that the compiled version is up-to-date, a good technique
when working on a large program is to occasionally run
<literal>ghc &ndash;&ndash;make</literal> to compile the whole project (say
<literal>ghc --make</literal> to compile the whole project (say
before you go for lunch :-), then continue working in the
interpreter. As you modify code, the changed modules will be
interpreted, but the rest of the project will remain
......@@ -1715,7 +1715,7 @@ a :: a
<para>The history is only available when
using <literal>:trace</literal>; the reason for this is we found that
logging each breakpoint in the history cuts performance by a factor of
2 or more. By default, GHCi remembers the last 50 steps in the history, but this can be changed with the <option>-fghci-hist-size=<replaceable>n</replaceable></option><indexterm><primary><option>&ndash;fghci-hist-size</option></primary></indexterm> option).</para>
2 or more. By default, GHCi remembers the last 50 steps in the history, but this can be changed with the <option>-fghci-hist-size=<replaceable>n</replaceable></option><indexterm><primary><option>-fghci-hist-size</option></primary></indexterm> option).</para>
</sect2>
<sect2 id="ghci-debugger-exceptions">
......@@ -1910,10 +1910,10 @@ Just 20
<sect1 id="ghci-invocation">
<title>Invoking GHCi</title>
<indexterm><primary>invoking</primary><secondary>GHCi</secondary></indexterm>
<indexterm><primary><option>&ndash;&ndash;interactive</option></primary></indexterm>
<indexterm><primary><option>--interactive</option></primary></indexterm>
<para>GHCi is invoked with the command <literal>ghci</literal> or
<literal>ghc &ndash;&ndash;interactive</literal>. One or more modules or
<literal>ghc --interactive</literal>. One or more modules or
filenames can also be specified on the command line; this
instructs GHCi to load the specified modules or filenames (and all
the modules they depend on), just as if you had said
......@@ -2255,11 +2255,11 @@ Prelude> :mycd ..
</screen>
<para>Or I could define a simple way to invoke
&ldquo;<literal>ghc &ndash;&ndash;make Main</literal>&rdquo; in the
&ldquo;<literal>ghc --make Main</literal>&rdquo; in the
current directory:</para>
<screen>
Prelude> :def make (\_ -> return ":! ghc &ndash;&ndash;make Main")
Prelude> :def make (\_ -> return ":! ghc --make Main")
</screen>
<para>We can define a command that reads GHCi input from a
......
......@@ -302,7 +302,7 @@
<para>The version number of your copy of GHC can be found by
invoking <literal>ghc</literal> with the
<literal>&ndash;&ndash;version</literal> flag (see <xref
<literal>--version</literal> flag (see <xref
linkend="options-help"/>).</para>
</sect1>
......
......@@ -13,7 +13,7 @@ Packages
url="http://hackage.haskell.org/packages/hackage.html">HackageDB</ulink>.</para>
<para>Using a package couldn't be simpler: if you're using
<option>&ndash;&ndash;make</option> or GHCi, then most of the installed packages will be
<option>--make</option> or GHCi, then most of the installed packages will be
automatically available to your program without any further options. The
exceptions to this rule are covered below in <xref
linkend="using-packages" />.</para>
......@@ -147,8 +147,8 @@ exposed-modules: Network.BSD,
or dynamically is controlled by the flag
pair <option>-static</option>/<option>-dynamic</option>.</para>
<para>In <option>&ndash;&ndash;make</option> mode
and <option>&ndash;&ndash;interactive</option> mode (see
<para>In <option>--make</option> mode
and <option>--interactive</option> mode (see
<xref linkend="modes" />), the compiler normally
determines which packages are required by the current
Haskell modules, and links only those. In batch mode
......@@ -961,9 +961,9 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
<varlistentry>
<term>
<option>&ndash;&ndash;force</option>
<option>--force</option>
<indexterm><primary>
<option>&ndash;&ndash;force</option>
<option>--force</option>
</primary></indexterm>
</term>
<listitem>
......@@ -977,7 +977,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
<varlistentry>
<term>
<option>&ndash;&ndash;global</option><indexterm><primary><option>&ndash;&ndash;global</option></primary>
<option>--global</option><indexterm><primary><option>--global</option></primary>
</indexterm>
</term>
<listitem>
......@@ -991,7 +991,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
<varlistentry>
<term>
<option>&ndash;&ndash;help</option><indexterm><primary><option>&ndash;&ndash;help</option></primary>
<option>--help</option><indexterm><primary><option>--help</option></primary>
</indexterm>
</term>
<term>
......@@ -1005,7 +1005,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
<varlistentry>
<term>
<option>&ndash;&ndash;user</option><indexterm><primary><option>&ndash;&ndash;user</option></primary>
<option>--user</option><indexterm><primary><option>--user</option></primary>
</indexterm>
</term>
<listitem>
......@@ -1040,7 +1040,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
</indexterm>
</term>
<term>
<option>&ndash;&ndash;version</option><indexterm><primary><option>&ndash;&ndash;version</option></primary>
<option>--version</option><indexterm><primary><option>--version</option></primary>
</indexterm>
</term>
<listitem>
......@@ -1115,11 +1115,11 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
it. To build one manually, the following
GNU <command>ld</command> command can be used:</para>
<screen>ld -r &ndash;&ndash;whole-archive -o HSfoo.o libHSfoo.a</screen>
<screen>ld -r --whole-archive -o HSfoo.o libHSfoo.a</screen>
<para>(replace
<literal>&ndash;&ndash;whole-archive</literal> with
<literal>&ndash;all_load</literal> on MacOS X)</para>
<literal>--whole-archive</literal> with
<literal>-all_load</literal> on MacOS X)</para>
</listitem>
<listitem>
<para>When building the package as shared library, GHC can be used to
......
......@@ -693,7 +693,7 @@ $ cat foo.hspp</screen>
</term>
<listitem>
<para>Omits the link step. This option can be used with
<option>&ndash;&ndash;make</option> to avoid the automatic linking
<option>--make</option> to avoid the automatic linking
that takes place if the program contains a <literal>Main</literal>
module.</para>
</listitem>
......
......@@ -1077,7 +1077,7 @@ MAIN MAIN 102 0 0.0 0.0 100.0 1
</sect1>
<sect1 id="hp2ps">
<title><command>hp2ps</command>&ndash;&ndash;heap profile to PostScript</title>
<title><command>hp2ps</command>--heap profile to PostScript</title>
<indexterm><primary><command>hp2ps</command></primary></indexterm>
<indexterm><primary>heap profiles</primary></indexterm>
......
......@@ -100,7 +100,7 @@ $ ./prog -f +RTS -H32m -S -RTS -h foo bar
<para>
If you absolutely positively want all the rest of the options
in a command line to go to the program (and not the RTS), use a
<option>&ndash;&ndash;RTS</option><indexterm><primary><option>--RTS</option></primary></indexterm>.
<option>--RTS</option><indexterm><primary><option>--RTS</option></primary></indexterm>.
</para>
<para>
......
......@@ -1037,7 +1037,7 @@ M.o : X.hi-boot
locate any imported modules that come from packages. The
package modules won't be included in the dependencies
generated, though (but see the
<option>&ndash;&ndash;include-pkg-deps</option> option below).</para>
<option>--include-pkg-deps</option> option below).</para>
<para>The dependency generation phase of GHC can take some
additional options, which you may find useful.
......@@ -1104,7 +1104,7 @@ M.o : X.hi-boot
</varlistentry>
<varlistentry>
<term><option>&ndash;&ndash;exclude-module=&lt;file&gt;</option></term>
<term><option>--exclude-module=&lt;file&gt;</option></term>
<listitem>
<para>Regard <filename>&lt;file&gt;</filename> as
"stable"; i.e., exclude it from having dependencies on
......@@ -1113,7 +1113,7 @@ M.o : X.hi-boot
</varlistentry>
<varlistentry>
<term><option>&ndash;&ndash;include-pkg-deps</option></term>
<term><option>--include-pkg-deps</option></term>
<listitem>
<para>Regard modules imported from packages as unstable,
i.e., generate dependencies on any imported package modules
......
......@@ -183,7 +183,7 @@ module X where
<varlistentry>
<term>Mode flags</term>
<listitem>
<para>For example, <option>&ndash;&ndash;make</option> or <option>-E</option>.
<para>For example, <option>--make</option> or <option>-E</option>.
There may only be a single mode flag on the command line. The
available modes are listed in <xref linkend="modes"/>.</para>
</listitem>
......@@ -341,10 +341,10 @@ module X where
<varlistentry>
<term>
<cmdsynopsis><command>ghc &ndash;&ndash;make</command>
<cmdsynopsis><command>ghc --make</command>
</cmdsynopsis>
<indexterm><primary>make mode</primary></indexterm>
<indexterm><primary><option>&ndash;&ndash;make</option></primary></indexterm>
<indexterm><primary><option>--make</option></primary></indexterm>
</term>
<listitem>
<para>In this mode, GHC will build a multi-module Haskell
......@@ -357,7 +357,7 @@ module X where
<para>
This mode is the default if there are any Haskell
source files mentioned on the command line, and in this case
the <option>&ndash;&ndash;make</option> option can be omitted.
the <option>--make</option> option can be omitted.
</para>
</listitem>
</varlistentry>
......@@ -435,7 +435,7 @@ module X where
<cmdsynopsis>
<command>ghc --help</command> <command>ghc -?</command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;help</option></primary></indexterm>
<indexterm><primary><option>--help</option></primary></indexterm>
</term>
<listitem>
<para>Cause GHC to spew a long usage message to standard
......@@ -448,7 +448,7 @@ module X where
<cmdsynopsis>
<command>ghc --show-iface <replaceable>file</replaceable></command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;show-iface</option></primary></indexterm>
<indexterm><primary><option>--show-iface</option></primary></indexterm>
</term>
<listitem>
<para>Read the interface in
......@@ -463,7 +463,7 @@ module X where
<command>ghc --supported-extensions</command>
<command>ghc --supported-languages</command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;supported-extensions</option></primary><primary><option>&ndash;&ndash;supported-languages</option></primary></indexterm>
<indexterm><primary><option>--supported-extensions</option></primary><primary><option>--supported-languages</option></primary></indexterm>
</term>
<listitem>
<para>Print the supported language extensions.</para>
......@@ -475,7 +475,7 @@ module X where
<cmdsynopsis>
<command>ghc --show-options</command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;show-options</option></primary></indexterm>
<indexterm><primary><option>--show-options</option></primary></indexterm>
</term>
<listitem>
<para>Print the supported command line options. This flag can be used for autocompletion in a shell.</para>
......@@ -487,7 +487,7 @@ module X where
<cmdsynopsis>
<command>ghc --info</command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;info</option></primary></indexterm>
<indexterm><primary><option>--info</option></primary></indexterm>
</term>
<listitem>
<para>Print information about the compiler.</para>
......@@ -501,7 +501,7 @@ module X where
<command>ghc -V</command>
</cmdsynopsis>
<indexterm><primary><option>-V</option></primary></indexterm>
<indexterm><primary><option>&ndash;&ndash;version</option></primary></indexterm>
<indexterm><primary><option>--version</option></primary></indexterm>
</term>
<listitem>
<para>Print a one-line string including GHC's version number.</para>
......@@ -513,7 +513,7 @@ module X where
<cmdsynopsis>
<command>ghc --numeric-version</command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;numeric-version</option></primary></indexterm>
<indexterm><primary><option>--numeric-version</option></primary></indexterm>
</term>
<listitem>
<para>Print GHC's numeric version number only.</para>
......@@ -525,7 +525,7 @@ module X where
<cmdsynopsis>
<command>ghc --print-libdir</command>
</cmdsynopsis>
<indexterm><primary><option>&ndash;&ndash;print-libdir</option></primary></indexterm>
<indexterm><primary><option>--print-libdir</option></primary></indexterm>
</term>
<listitem>
<para>Print the path to GHC's library directory. This is
......@@ -542,8 +542,8 @@ module X where
</variablelist>
<sect2 id="make-mode">
<title>Using <command>ghc</command> <option>&ndash;&ndash;make</option></title>
<indexterm><primary><option>&ndash;&ndash;make</option></primary></indexterm>
<title>Using <command>ghc</command> <option>--make</option></title>
<indexterm><primary><option>--make</option></primary></indexterm>
<indexterm><primary>separate compilation</primary></indexterm>
<para>In this mode, GHC will build a multi-module Haskell program by following
......@@ -554,7 +554,7 @@ module X where
program like this:</para>
<screen>
ghc &ndash;&ndash;make Main.hs
ghc --make Main.hs
</screen>
<para>
......@@ -575,7 +575,7 @@ ghc Main.hs
program will also be linked into an executable.</para>
<para>The main advantages to using <literal>ghc
&ndash;&ndash;make</literal> over traditional
--make</literal> over traditional
<literal>Makefile</literal>s are:</para>
<itemizedlist>
......@@ -583,7 +583,7 @@ ghc Main.hs
<para>GHC doesn't have to be restarted for each compilation,
which means it can cache information between compilations.
Compiling a multi-module program with <literal>ghc
&ndash;&ndash;make</literal> can be up to twice as fast as
--make</literal> can be up to twice as fast as
running <literal>ghc</literal> individually on each source
file.</para>
</listitem>
......@@ -600,7 +600,7 @@ ghc Main.hs
<para>Any of the command-line options described in the rest of
this chapter can be used with
<option>&ndash;&ndash;make</option>, but note that any options
<option>--make</option>, but note that any options
you give on the command line will apply to all the source files
compiled, so if you want any options to apply to a single source
file only, you'll need to use an <literal>OPTIONS_GHC</literal>
......@@ -840,8 +840,8 @@ ghc -c Foo.hs
<listitem>
<para>Minimal verbosity: print one line per
compilation (this is the default when
<option>&ndash;&ndash;make</option> or
<option>&ndash;&ndash;interactive</option> is on).</para>
<option>--make</option> or
<option>--interactive</option> is on).</para>
</listitem>
</varlistentry>
......
......@@ -187,7 +187,7 @@ tags:
<variablelist>
<varlistentry>
<term><literal>-o FILE</literal> or
<literal>&ndash;&ndash;output=FILE</literal></term>
<literal>--output=FILE</literal></term>
<listitem>
<para>Name of the Haskell file.</para>
</listitem>
......@@ -195,7 +195,7 @@ tags:
<varlistentry>
<term><literal>-t FILE</literal> or
<literal>&ndash;&ndash;template=FILE</literal></term>
<literal>--template=FILE</literal></term>
<listitem>
<para>The template file (see below).</para>
</listitem>
......@@ -203,7 +203,7 @@ tags:
<varlistentry>
<term><literal>-c PROG</literal> or
<literal>&ndash;&ndash;cc=PROG</literal></term>
<literal>--cc=PROG</literal></term>
<listitem>
<para>The C compiler to use (default:
<command>gcc</command>)</para>
......@@ -212,7 +212,7 @@ tags:
<varlistentry>
<term><literal>-l PROG</literal> or
<literal>&ndash;&ndash;ld=PROG</literal></term>
<literal>--ld=PROG</literal></term>
<listitem>
<para>The linker to use (default:
<command>gcc</command>).</para>
......@@ -221,7 +221,7 @@ tags:
<varlistentry>
<term><literal>-C FLAG</literal> or
<literal>&ndash;&ndash;cflag=FLAG</literal></term>
<literal>--cflag=FLAG</literal></term>
<listitem>
<para>An extra flag to pass to the C compiler.</para>
</listitem>
......@@ -236,7 +236,7 @@ tags:
<varlistentry>
<term><literal>-L FLAG</literal> or
<literal>&ndash;&ndash;lflag=FLAG</literal></term>
<literal>--lflag=FLAG</literal></term>
<listitem>
<para>An extra flag to pass to the linker.</para>
</listitem>
......@@ -244,7 +244,7 @@ tags:
<varlistentry>
<term><literal>-i FILE</literal> or
<literal>&ndash;&ndash;include=FILE</literal></term>
<literal>--include=FILE</literal></term>
<listitem>
<para>As if the appropriate <literal>#include</literal>
directive was placed in the source.</para>
......@@ -253,7 +253,7 @@ tags:
<varlistentry>
<term><literal>-D NAME[=VALUE]</literal> or
<literal>&ndash;&ndash;define=NAME[=VALUE]</literal></term>
<literal>--define=NAME[=VALUE]</literal></term>
<listitem>
<para>As if the appropriate <literal>#define</literal>
directive was placed in the source.</para>
......@@ -261,7 +261,7 @@ tags:
</varlistentry>
<varlistentry>
<term><literal>&ndash;&ndash;no-compile</literal></term>
<term><literal>--no-compile</literal></term>
<listitem>
<para>Stop after writing out the intermediate C program to disk.
The file name for the intermediate C program is the input file name
......@@ -271,7 +271,7 @@ tags:
<varlistentry>
<term><literal>-k</literal> or
<literal>&ndash;&ndash;keep-files</literal></term>
<literal>--keep-files</literal></term>
<listitem>
<para>Proceed as normal, but do not delete any intermediate files.</para>
</listitem>
......@@ -279,14 +279,14 @@ tags:
<varlistentry>
<term><literal>-x</literal> or
<literal>&ndash;&ndash;cross-compile</literal></term>
<literal>--cross-compile</literal></term>
<listitem>
<para>Activate cross-compilation mode (see <xref linkend="hsc2hs_cross"/>).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>&ndash;&ndash;cross-safe</literal></term>
<term><literal>--cross-safe</literal></term>
<listitem>
<para>Restrict the .hsc directives to those supported by the
<literal>--cross-compile</literal> mode (see <xref linkend="hsc2hs_cross"/>).
......@@ -298,14 +298,14 @@ tags:
<varlistentry>
<term><literal>-?</literal> or <literal>&ndash;&ndash;help</literal></term>
<term><literal>-?</literal> or <literal>--help</literal></term>
<listitem>
<para>Display a summary of the available flags and exit successfully.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>-V</literal> or <literal>&ndash;&ndash;version</literal></term>
<term><literal>-V</literal> or <literal>--version</literal></term>
<listitem>
<para>Output version information and exit successfully.</para>
</listitem>
......
......@@ -313,7 +313,7 @@ option on all the Haskell modules that make up your application.
<para>
<indexterm><primary>Creating a Win32 DLL</primary></indexterm>
<indexterm><primary>&ndash;shared</primary></indexterm>
<indexterm><primary>-shared</primary></indexterm>
Sealing up your Haskell library inside a DLL is straightforward;
compile up the object files that make up the library, and then build
the DLL by issuing a command of the form:
......@@ -321,12 +321,12 @@ the DLL by issuing a command of the form:
<para>
<screen>
ghc &ndash;shared -o foo.dll bar.o baz.o wibble.a -lfooble
ghc -shared -o foo.dll bar.o baz.o wibble.a -lfooble
</screen>
</para>
<para>
By feeding the ghc compiler driver the option <option>&ndash;shared</option>, it
By feeding the ghc compiler driver the option <option>-shared</option>, it
will build a DLL rather than produce an executable. The DLL will
consist of all the object files and archives given on the command
line.
......@@ -366,12 +366,12 @@ you compile into a DLL must have a common root.
<listitem>
<para>
By default, the entry points of all the object files will be exported from
the DLL when using <option>&ndash;shared</option>. Should you want to constrain
the DLL when using <option>-shared</option>. Should you want to constrain
this, you can specify the <emphasis>module definition file</emphasis> to use
on the command line as follows:
<screen>
ghc &ndash;shared -o .... MyDef.def
ghc -shared -o .... MyDef.def
</screen>
See Microsoft documentation for details, but a module definition file
......@@ -390,7 +390,7 @@ EXPORTS
<listitem>
<para>
In addition to creating a DLL, the <option>&ndash;shared</option> option also
In addition to creating a DLL, the <option>-shared</option> option also
creates an import library. The import library name is derived from the
name of the DLL, as follows:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment