Replace all instances of '--' with '––' since '--' gets
interpreted by JadeTeX to mean a single dash.
14 files changed:
been added (<xref linkend="ghci">).</para>
</listitem>
<listitem>
been added (<xref linkend="ghci">).</para>
</listitem>
<listitem>
- <para>New <option>--make</option> flag added (<xref
+ <para>New <option>––make</option> flag added (<xref
linkend="make-mode">).</para>
</listitem>
<listitem>
linkend="make-mode">).</para>
</listitem>
<listitem>
<listitem>
<para>The <literal>WithGhcHc</literal> setting in
<literal>build.mk</literal> has been replaced by the
<listitem>
<para>The <literal>WithGhcHc</literal> setting in
<literal>build.mk</literal> has been replaced by the
- <literal>--with-ghc=<replaceable>ghc</replaceable></literal>
+ <literal>––with-ghc=<replaceable>ghc</replaceable></literal>
option to <literal>configure</literal>. The new option
<emphasis>must</emphasis> be used if you intend to use
anything except “<literal>ghc</literal>” to
option to <literal>configure</literal>. The new option
<emphasis>must</emphasis> be used if you intend to use
anything except “<literal>ghc</literal>” to
multiple modules for the <literal>:add</literal> and
<literal>:load</literal> commands. From the command line, you
may specify multiple modules when starting GHCi and when
multiple modules for the <literal>:add</literal> and
<literal>:load</literal> commands. From the command line, you
may specify multiple modules when starting GHCi and when
- compiling in <option>--make</option> mode. See
+ compiling in <option>––make</option> mode. See
<xref linkend="ghci-commands">.</para>
</listitem>
<xref linkend="ghci-commands">.</para>
</listitem>
remember to include <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
remember to include <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 --make</literal>, as GHC will automatically
+ with <literal>ghc ––make</literal>, as GHC will automatically
link in the correct bits).</para>
</sect3>
</sect2>
link in the correct bits).</para>
</sect3>
</sect2>
<entry>-</entry>
</row>
<row>
<entry>-</entry>
</row>
<row>
- <entry><option>--version</option></entry>
+ <entry><option>––version</option></entry>
<entry>display GHC version</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry>display GHC version</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
- <entry><option>--numeric-version</option></entry>
+ <entry><option>––numeric-version</option></entry>
<entry>display GHC version (numeric only)</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
<entry>display GHC version (numeric only)</entry>
<entry>static</entry>
<entry>-</entry>
</row>
<row>
- <entry><option>--print-libdir</option></entry>
+ <entry><option>––print-libdir</option></entry>
<entry>display GHC library directory</entry>
<entry>static</entry>
<entry>-</entry>
<entry>display GHC library directory</entry>
<entry>static</entry>
<entry>-</entry>
<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
<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>--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
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
<para>HINT: since GHCi will only use a compiled object file if it
can sure that the compiled version is up-to-date, a good technique
when working on a large program is to occasionally run
<para>HINT: since GHCi will only use a compiled object file if it
can sure that the compiled version is up-to-date, a good technique
when working on a large program is to occasionally run
- <literal>ghc --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 new modules will be
interpreted, but the rest of the project will remain
before you go for lunch :-), then continue working in the
interpreter. As you modify code, the new modules will be
interpreted, but the rest of the project will remain
<sect1 id="ghci-invokation">
<title>Invoking GHCi</title>
<indexterm><primary>invoking</primary><secondary>GHCi</secondary></indexterm>
<sect1 id="ghci-invokation">
<title>Invoking GHCi</title>
<indexterm><primary>invoking</primary><secondary>GHCi</secondary></indexterm>
- <indexterm><primary><option>--interactive</option></primary></indexterm>
+ <indexterm><primary><option>––interactive</option></primary></indexterm>
<para>GHCi is invoked with the command <literal>ghci</literal> or
<para>GHCi is invoked with the command <literal>ghci</literal> or
- <literal>ghc --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
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
</screen>
<para>Or I could define a simple way to invoke
</screen>
<para>Or I could define a simple way to invoke
- “<literal>ghc --make Main</literal>” in the
+ “<literal>ghc ––make Main</literal>” in the
current directory:</para>
<screen>
current directory:</para>
<screen>
-Prelude> :def make (\_ -> return ":! ghc --make Main")
+Prelude> :def make (\_ -> return ":! ghc ––make Main")
<programlisting>
$(libdir)/
package.conf GHC package configuration
<programlisting>
$(libdir)/
package.conf GHC package configuration
- ghc-usage.txt Message displayed by ghc --help
+ ghc-usage.txt Message displayed by ghc ––help
bin/ [Win32 only] User-visible binaries
ghc.exe
bin/ [Win32 only] User-visible binaries
ghc.exe
<para>The version number of your copy of GHC can be found by
invoking <literal>ghc</literal> with the
<para>The version number of your copy of GHC can be found by
invoking <literal>ghc</literal> with the
- <literal>--version</literal> flag (see <xref
+ <literal>––version</literal> flag (see <xref
linkend="options-help">).</para>
</sect1>
linkend="options-help">).</para>
</sect1>
hand from the <literal>.a</literal> archive, it is possible
to use GNU <command>ld</command> as follows:</para>
hand from the <literal>.a</literal> archive, it is possible
to use GNU <command>ld</command> as follows:</para>
-<screen>ld -r --whole-archive -o HSfoo.o libHSfoo.a</screen>
+<screen>ld -r ––whole-archive -o HSfoo.o libHSfoo.a</screen>
added or removed from a package configuration file. By default,
the system-wide configuration file is used, but alternatively
packages can be added or removed from a user-specified
added or removed from a package configuration file. By default,
the system-wide configuration file is used, but alternatively
packages can be added or removed from a user-specified
- configuration file using the <option>--config-file</option>
+ configuration file using the <option>––config-file</option>
option. An empty package configuration file consists of the
string <quote><literal>[]</literal></quote>.</para>
option. An empty package configuration file consists of the
string <quote><literal>[]</literal></quote>.</para>
<variablelist>
<varlistentry>
<variablelist>
<varlistentry>
- <term><option>--add-package</option></term>
+ <term><option>––add-package</option></term>
<term><option>-a</option></term>
<term><option>-a</option></term>
- <indexterm><primary><option>--add-package</option></primary></indexterm>
+ <indexterm><primary><option>––add-package</option></primary></indexterm>
<listitem>
<para>Reads package specification from the input (see below),
and adds it to the database of installed packages. The
<listitem>
<para>Reads package specification from the input (see below),
and adds it to the database of installed packages. The
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--input-file=<replaceable>file</replaceable></option></term>
+ <term><option>––input-file=<replaceable>file</replaceable></option></term>
<term><option>-i <replaceable>file</replaceable></option></term>
<term><option>-i <replaceable>file</replaceable></option></term>
- <indexterm><primary><option>--input-file</option></primary></indexterm>
+ <indexterm><primary><option>––input-file</option></primary></indexterm>
<listitem>
<para>Read new package specifications from file
<replaceable>file</replaceable>. If a value of
<listitem>
<para>Read new package specifications from file
<replaceable>file</replaceable>. If a value of
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--auto-ghci-libs</option></term>
+ <term><option>––auto-ghci-libs</option></term>
<term><option>-g</option></term>
<term><option>-g</option></term>
- <indexterm><primary><option>--auto-ghci-libs</option></primary>
+ <indexterm><primary><option>––auto-ghci-libs</option></primary>
</indexterm>
<listitem>
<para>Automatically generate the GHCi
</indexterm>
<listitem>
<para>Automatically generate the GHCi
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--config-file <replaceable>file</replaceable></option></term>
+ <term><option>––config-file <replaceable>file</replaceable></option></term>
<term><option>-f <replaceable>file</replaceable></option></term>
<term><option>-f <replaceable>file</replaceable></option></term>
- <indexterm><primary><option>--config-file</option></primary>
+ <indexterm><primary><option>––config-file</option></primary>
</indexterm>
<listitem>
<para>Use <replaceable>file</replaceable> instead of the
</indexterm>
<listitem>
<para>Use <replaceable>file</replaceable> instead of the
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--list-packages</option></term>
+ <term><option>––list-packages</option></term>
<term><option>-l</option></term>
<term><option>-l</option></term>
- <indexterm><primary><option>--list-packages</option></primary></indexterm>
+ <indexterm><primary><option>––list-packages</option></primary></indexterm>
<listitem>
<para>This option displays the list of currently installed
packages.</para>
<screen>
<listitem>
<para>This option displays the list of currently installed
packages.</para>
<screen>
- $ ghc-pkg --list-packages
+ $ ghc-pkg ––list-packages
gmp, rts, std, lang, concurrent, data, net, posix, text, util
</screen>
gmp, rts, std, lang, concurrent, data, net, posix, text, util
</screen>
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--remove-package <replaceable>foo</replaceable></option></term>
+ <term><option>––remove-package <replaceable>foo</replaceable></option></term>
<term><option>-r <replaceable>foo</replaceable></option></term>
<term><option>-r <replaceable>foo</replaceable></option></term>
- <indexterm><primary><option>--delete-package</option></primary>
+ <indexterm><primary><option>––delete-package</option></primary>
</indexterm>
<listitem>
<para>Removes the specified package from the installed
</indexterm>
<listitem>
<para>Removes the specified package from the installed
</listitem>
</varlistentry>
<varlistentry>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--update-package</option></term>
+ <term><option>––update-package</option></term>
<term><option>-u</option></term>
<term><option>-u</option></term>
- <indexterm><primary><option>--update-package</option></primary></indexterm>
+ <indexterm><primary><option>––update-package</option></primary></indexterm>
<listitem>
<para>Reads package specification from the input, and
adds it to the database of installed packages. If a package
<listitem>
<para>Reads package specification from the input, and
adds it to the database of installed packages. If a package
<listitem>
<para>The package's name, for use with
the <literal>-package</literal> flag and as listed in the
<listitem>
<para>The package's name, for use with
the <literal>-package</literal> flag and as listed in the
- <literal>--list-packages</literal> list.
+ <literal>––list-packages</literal> list.
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
</sect1>
<sect1 id="hp2ps">
</sect1>
<sect1 id="hp2ps">
- <title><command>hp2ps</command>--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>
<indexterm><primary><command>hp2ps</command></primary></indexterm>
<indexterm><primary>heap profiles</primary></indexterm>
<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
<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>--RTS</option><indexterm><primary><option>--RTS</option></primary></indexterm>.</para>
+ <option>––RTS</option><indexterm><primary><option>--RTS</option></primary></indexterm>.</para>
<para>As always, for RTS options that take
<replaceable>size</replaceable>s: If the last character of
<para>As always, for RTS options that take
<replaceable>size</replaceable>s: If the last character of
locate any imported modules that come from packages. The
package modules won't be included in the dependencies
generated, though (but see the
locate any imported modules that come from packages. The
package modules won't be included in the dependencies
generated, though (but see the
- <option>--include-prelude</option> option below).</para>
+ <option>––include-prelude</option> option below).</para>
<para>The dependency generation phase of GHC can take some
additional options, which you may find useful. For historical
<para>The dependency generation phase of GHC can take some
additional options, which you may find useful. For historical
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--exclude-module=<file></option></term>
+ <term><option>––exclude-module=<file></option></term>
<listitem>
<para>Regard <filename><file></filename> as
"stable"; i.e., exclude it from having dependencies on
<listitem>
<para>Regard <filename><file></filename> as
"stable"; i.e., exclude it from having dependencies on
<varlistentry>
<term><option>-x</option></term>
<listitem>
<varlistentry>
<term><option>-x</option></term>
<listitem>
- <para>same as <option>--exclude-module</option></para>
+ <para>same as <option>––exclude-module</option></para>
</listitem>
</varlistentry>
<varlistentry>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--exclude-directory=<dirs></option></term>
+ <term><option>––exclude-directory=<dirs></option></term>
<listitem>
<para>Regard the colon-separated list of directories
<filename><dirs></filename> as containing stable,
<listitem>
<para>Regard the colon-separated list of directories
<filename><dirs></filename> as containing stable,
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--include-module=<file></option></term>
+ <term><option>––include-module=<file></option></term>
<listitem>
<para>Regard <filename><file></filename> as not
"stable"; i.e., generate dependencies on it (if
any). This option is normally used in conjunction with
<listitem>
<para>Regard <filename><file></filename> as not
"stable"; i.e., generate dependencies on it (if
any). This option is normally used in conjunction with
- the <option>--exclude-directory</option> option.</para>
+ the <option>––exclude-directory</option> option.</para>
</listitem>
</varlistentry>
<varlistentry>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--include-prelude</option></term>
+ <term><option>––include-prelude</option></term>
<listitem>
<para>Regard modules imported from packages as unstable,
i.e., generate dependencies on the package modules used
<listitem>
<para>Regard modules imported from packages as unstable,
i.e., generate dependencies on the package modules used
<variablelist>
<varlistentry>
<term><cmdsynopsis><command>ghc</command>
<variablelist>
<varlistentry>
<term><cmdsynopsis><command>ghc</command>
- <arg choice=plain>--interactive</arg>
+ <arg choice=plain>––interactive</arg>
</cmdsynopsis></term>
<indexterm><primary>interactive mode</primary>
</indexterm>
</cmdsynopsis></term>
<indexterm><primary>interactive mode</primary>
</indexterm>
<varlistentry>
<term><cmdsynopsis><command>ghc</command>
<varlistentry>
<term><cmdsynopsis><command>ghc</command>
- <arg choice=plain>--make</arg>
+ <arg choice=plain>––make</arg>
</cmdsynopsis></term>
<indexterm><primary>make mode</primary>
</indexterm>
</cmdsynopsis></term>
<indexterm><primary>make mode</primary>
</indexterm>
- <indexterm><primary><option>--make</option></primary>
+ <indexterm><primary><option>––make</option></primary>
</indexterm>
<listitem>
<para>In this mode, GHC will build a multi-module Haskell
</indexterm>
<listitem>
<para>In this mode, GHC will build a multi-module Haskell
<variablelist>
<varlistentry>
<variablelist>
<varlistentry>
- <term><option>--help</option></term>
+ <term><option>––help</option></term>
<term><option>-?</option></term>
<indexterm><primary><option>-?</option></primary></indexterm>
<term><option>-?</option></term>
<indexterm><primary><option>-?</option></primary></indexterm>
- <indexterm><primary><option>--help</option></primary></indexterm>
+ <indexterm><primary><option>––help</option></primary></indexterm>
<listitem>
<para>Cause GHC to spew a long usage message to standard
output and then exit.</para>
<listitem>
<para>Cause GHC to spew a long usage message to standard
output and then exit.</para>
<listitem>
<para>Minimal verbosity: print one line per
compilation (this is the default when
<listitem>
<para>Minimal verbosity: print one line per
compilation (this is the default when
- <option>--make</option> or
- <option>--interactive</option> is on).</para>
+ <option>––make</option> or
+ <option>––interactive</option> is on).</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--version</option></term>
- <indexterm><primary><option>--version</option></primary></indexterm>
+ <term><option>––version</option></term>
+ <indexterm><primary><option>––version</option></primary></indexterm>
<listitem>
<para>Print a one-line string including GHC's version number.</para>
</listitem>
</varlistentry>
<varlistentry>
<listitem>
<para>Print a one-line string including GHC's version number.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--numeric-version</option></term>
- <indexterm><primary><option>--numeric-version</option></primary></indexterm>
+ <term><option>––numeric-version</option></term>
+ <indexterm><primary><option>––numeric-version</option></primary></indexterm>
<listitem>
<para>Print GHC's numeric version number only.</para>
</listitem>
</varlistentry>
<varlistentry>
<listitem>
<para>Print GHC's numeric version number only.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--print-libdir</option></term>
- <indexterm><primary><option>--print-libdir</option></primary></indexterm>
+ <term><option>––print-libdir</option></term>
+ <indexterm><primary><option>––print-libdir</option></primary></indexterm>
<listitem>
<para>Print the path to GHC's library directory. This is
the top of the directory tree containing GHC's libraries,
<listitem>
<para>Print the path to GHC's library directory. This is
the top of the directory tree containing GHC's libraries,
</sect1>
<sect1 id="make-mode">
</sect1>
<sect1 id="make-mode">
- <title>Using <command>ghc</command> <option>--make</option></title>
+ <title>Using <command>ghc</command> <option>––make</option></title>
- <indexterm><primary><option>--make</option></primary>
+ <indexterm><primary><option>––make</option></primary>
</indexterm>
<indexterm><primary>separate compilation</primary>
</indexterm>
</indexterm>
<indexterm><primary>separate compilation</primary>
</indexterm>
- <para>When given the <option>--make</option> option, GHC will
+ <para>When given the <option>––make</option> option, GHC will
build a multi-module Haskell program by following dependencies
from a single root module (usually <literal>Main</literal>). For
example, if your <literal>Main</literal> module is in a file
build a multi-module Haskell program by following dependencies
from a single root module (usually <literal>Main</literal>). For
example, if your <literal>Main</literal> module is in a file
the program like this:</para>
<screen>
the program like this:</para>
<screen>
+ghc ––make Main.hs
</screen>
<para>The command line must contain one source file or module
</screen>
<para>The command line must contain one source file or module
if the top module is <literal>Main</literal>, the program
will also be linked into an executable.</para>
if the top module is <literal>Main</literal>, the program
will also be linked into an executable.</para>
- <para>The main advantages to using <literal>ghc --make</literal>
+ <para>The main advantages to using <literal>ghc ––make</literal>
over traditional <literal>Makefile</literal>s are:</para>
<itemizedlist>
over traditional <literal>Makefile</literal>s are:</para>
<itemizedlist>
<para>GHC doesn't have to be restarted for each compilation,
which means it can cache information between compilations.
Compiling a muli-module program with <literal>ghc
<para>GHC doesn't have to be restarted for each compilation,
which means it can cache information between compilations.
Compiling a muli-module program with <literal>ghc
- --make</literal> can be up to twice as fast as running
+ ––make</literal> can be up to twice as fast as running
<literal>ghc</literal> individually on each source
file.</para>
</listitem>
<literal>ghc</literal> individually on each source
file.</para>
</listitem>
</itemizedlist>
<para>Any of the command-line options described in the rest of
</itemizedlist>
<para>Any of the command-line options described in the rest of
- this chapter can be used with <option>--make</option>, but note
+ this chapter can be used with <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
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
</sect1>
<Sect1 id="options-order">
</sect1>
<Sect1 id="options-order">
- <title>GHC without <option>--make</option></title>
+ <title>GHC without <option>––make</option></title>
- <para>Without <option>--make</option>, GHC will compile one or
+ <para>Without <option>––make</option>, GHC will compile one or
more source files given on the command line.</para>
<para>The first phase to run is determined by each input-file
more source files given on the command line.</para>
<para>The first phase to run is determined by each input-file
<variablelist>
<varlistentry>
<term><literal>-t FILE</literal> or
<variablelist>
<varlistentry>
<term><literal>-t FILE</literal> or
- <literal>--template=FILE</literal></term>
+ <literal>––template=FILE</literal></term>
<listitem>
<para>The template file (see below).</para>
</listitem>
<listitem>
<para>The template file (see below).</para>
</listitem>
<varlistentry>
<term><literal>-c PROG</literal> or
<varlistentry>
<term><literal>-c PROG</literal> or
- <literal>--cc=PROG</literal></term>
+ <literal>––cc=PROG</literal></term>
<listitem>
<para>The C compiler to use (default:
<command>ghc</command>)</para>
<listitem>
<para>The C compiler to use (default:
<command>ghc</command>)</para>
<varlistentry>
<term><literal>-l PROG</literal> or
<varlistentry>
<term><literal>-l PROG</literal> or
- <literal>--ld=PROG</literal></term>
+ <literal>––ld=PROG</literal></term>
<listitem>
<para>The linker to use (default:
<command>gcc</command>).</para>
<listitem>
<para>The linker to use (default:
<command>gcc</command>).</para>
<varlistentry>
<term><literal>-C FLAG</literal> or
<varlistentry>
<term><literal>-C FLAG</literal> or
- <literal>--cflag=FLAG</literal></term>
+ <literal>––cflag=FLAG</literal></term>
<listitem>
<para>An extra flag to pass to the C compiler.</para>
</listitem>
<listitem>
<para>An extra flag to pass to the C compiler.</para>
</listitem>
<varlistentry>
<term><literal>-L FLAG</literal> or
<varlistentry>
<term><literal>-L FLAG</literal> or
- <literal>--lflag=FLAG</literal></term>
+ <literal>––lflag=FLAG</literal></term>
<listitem>
<para>An extra flag to pass to the linker.</para>
</listitem>
<listitem>
<para>An extra flag to pass to the linker.</para>
</listitem>
<varlistentry>
<term><literal>-i FILE</literal> or
<varlistentry>
<term><literal>-i FILE</literal> or
- <literal>--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>
<listitem>
<para>As if the appropriate <literal>#include</literal>
directive was placed in the source.</para>
<varlistentry>
<term><literal>-D NAME[=VALUE]</literal> or
<varlistentry>
<term><literal>-D NAME[=VALUE]</literal> or
- <literal>--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>
<listitem>
<para>As if the appropriate <literal>#define</literal>
directive was placed in the source.</para>
<varlistentry>
<term><literal>-o FILE</literal> or
<varlistentry>
<term><literal>-o FILE</literal> or
- <literal>--output=FILE</literal></term>
+ <literal>––output=FILE</literal></term>
<listitem>
<para>Name of the Haskell file.</para>
</listitem>
</varlistentry>
<varlistentry>
<listitem>
<para>Name of the Haskell file.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>--help</literal></term>
+ <term><literal>––help</literal></term>
<listitem>
<para>Display a summary of the available flags.</para>
</listitem>
</varlistentry>
<varlistentry>
<listitem>
<para>Display a summary of the available flags.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>--version</literal></term>
+ <term><literal>––version</literal></term>
<listitem>
<para>Output version information.</para>
</listitem>
</varlistentry>
<varlistentry>
<listitem>
<para>Output version information.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>--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
<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
building an entire Haskell application as a DLL is still supported
(it's just inter-DLL Haskell calls that don't work).</emphasis>
<IndexTerm><Primary>Creating a Win32 DLL</Primary></IndexTerm>
building an entire Haskell application as a DLL is still supported
(it's just inter-DLL Haskell calls that don't work).</emphasis>
<IndexTerm><Primary>Creating a Win32 DLL</Primary></IndexTerm>
-<IndexTerm><Primary>--mk-dll</Primary></IndexTerm>
+<IndexTerm><Primary>––mk-dll</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:
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:
-ghc --mk-dll -o foo.dll bar.o baz.o wibble.a -lfooble
+ghc ––mk-dll -o foo.dll bar.o baz.o wibble.a -lfooble
-By feeding the ghc compiler driver the option <Option>--mk-dll</Option>, it
+By feeding the ghc compiler driver the option <Option>––mk-dll</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.
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.
<ListItem>
<Para>
By default, the entry points of all the object files will be exported from
<ListItem>
<Para>
By default, the entry points of all the object files will be exported from
-the DLL when using <Option>--mk-dll</Option>. Should you want to constrain
+the DLL when using <Option>––mk-dll</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>
this, you can specify the <Emphasis>module definition file</Emphasis> to use
on the command line as follows:
<Screen>
-ghc --mk-dll -o .... -optdll--def -optdllMyDef.def
+ghc ––mk-dll -o .... -optdll--def -optdllMyDef.def
</Screen>
See Microsoft documentation for details, but a module definition file
</Screen>
See Microsoft documentation for details, but a module definition file
-In addition to creating a DLL, the <Option>--mk-dll</Option> option also
+In addition to creating a DLL, the <Option>––mk-dll</Option> option also
creates an import library. The import library name is derived from the
name of the DLL, as follows:
creates an import library. The import library name is derived from the
name of the DLL, as follows:
<ListItem>
<Para>
compile up a <Function>DllMain()</Function> that starts up the Haskell
<ListItem>
<Para>
compile up a <Function>DllMain()</Function> that starts up the Haskell
-RTS---a possible implementation is:
+RTS-––a possible implementation is:
<ProgramListing>
#include <windows.h>
<ProgramListing>
#include <windows.h>
Construct the DLL:
<Screen>
Construct the DLL:
<Screen>
-ghc --mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
+ghc ––mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
-Start using <Function>adder</Function> from VBA---here's how I would
+Start using <Function>adder</Function> from VBA-––here's how I would
<Constant>Declare</Constant> it:
<ProgramListing>
<Constant>Declare</Constant> it:
<ProgramListing>