diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/users_guide/flags.xml | 2 | ||||
| -rw-r--r-- | docs/users_guide/packages.xml | 18 |
2 files changed, 8 insertions, 12 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index 1dd224a611..8381ca1254 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -590,7 +590,7 @@ </thead> <tbody> <row> - <entry><option>-package-name</option> <replaceable>P</replaceable></entry> + <entry><option>-this-package-key</option> <replaceable>P</replaceable></entry> <entry>Compile to be part of package <replaceable>P</replaceable></entry> <entry>static</entry> <entry>-</entry> diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml index 62b4e96bfd..50549b409c 100644 --- a/docs/users_guide/packages.xml +++ b/docs/users_guide/packages.xml @@ -258,19 +258,15 @@ exposed-modules: Network.BSD, </varlistentry> <varlistentry> - <term><option>-package-name</option> <replaceable>foo</replaceable> - <indexterm><primary><option>-package-name</option></primary> + <term><option>-this-package-key</option> <replaceable>foo</replaceable> + <indexterm><primary><option>-this-package-key</option></primary> </indexterm></term> <listitem> <para>Tells GHC the the module being compiled forms part of - package <replaceable>foo</replaceable>. + package key <replaceable>foo</replaceable>; internally, these + keys are used to determine type equality and linker symbols. If this flag is omitted (a very common case) then the default package <literal>main</literal> is assumed.</para> - <para>Note: the argument to <option>-package-name</option> - should be the full - package <literal>name-version</literal> for the package. - For example: - <literal>-package mypkg-1.2</literal>.</para> </listitem> </varlistentry> @@ -328,7 +324,7 @@ exposed-modules: Network.BSD, <para>Every complete Haskell program must define <literal>main</literal> in module <literal>Main</literal> - in package <literal>main</literal>. (Omitting the <option>-package-name</option> flag compiles + in package <literal>main</literal>. (Omitting the <option>-this-package-key</option> flag compiles code for package <literal>main</literal>.) Failure to do so leads to a somewhat obscure link-time error of the form: <programlisting> @@ -1170,8 +1166,8 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf </itemizedlist> <para>To compile a module which is to be part of a new package, - use the <literal>-package-name</literal> option (<xref linkend="using-packages"/>). - Failure to use the <literal>-package-name</literal> option + use the <literal>-this-package-key</literal> option (<xref linkend="using-packages"/>). + Failure to use the <literal>-this-package-key</literal> option when compiling a package will probably result in disaster, but you will only discover later when you attempt to import modules from the package. At this point GHC will complain that the |
