Fix more library links in the user guide
authorIan Lynagh <igloo@earth.li>
Tue, 23 Feb 2010 16:45:51 +0000 (16:45 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 23 Feb 2010 16:45:51 +0000 (16:45 +0000)
aclocal.m4
configure.ac
docs/users_guide/glasgow_exts.xml
docs/users_guide/packages.xml
docs/users_guide/parallel.xml
docs/users_guide/ug-ent.xml.in

index 275b2e4..816e1f5 100644 (file)
@@ -1329,10 +1329,11 @@ case "$1" in
 
 # LIBRARY_VERSION(lib)
 # --------------------------------
-# Gets the version number of a library
+# Gets the version number of a library.
+# If $1 is ghc-prim, then we define LIBRARY_ghc_prim_VERSION as 1.2.3
 AC_DEFUN([LIBRARY_VERSION],[
-LIBRARY_$1_VERSION=`grep -i "^version:" libraries/$1/$1.cabal | sed "s/.* //"`
-AC_SUBST(LIBRARY_$1_VERSION)
+LIBRARY_[]translit([$1], [-], [_])[]_VERSION=`grep -i "^version:" libraries/$1/$1.cabal | sed "s/.* //"`
+AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION)
 ])
 
 # LocalWords:  fi
index 989a223..5415246 100644 (file)
@@ -903,6 +903,8 @@ AC_SUBST(BUILD_DOCBOOK_PS)
 AC_SUBST(BUILD_DOCBOOK_PDF)
 
 LIBRARY_VERSION(base)
+LIBRARY_VERSION(Cabal)
+LIBRARY_VERSION(ghc-prim)
 
 if grep '      ' compiler/ghc.cabal.in 2>&1 >/dev/null; then
    AC_MSG_ERROR([compiler/ghc.cabal.in contains tab characters; please remove them])
index cacf97d..4668bbb 100644 (file)
@@ -110,7 +110,7 @@ While you really can use this stuff to write fast code,
 
 <para>All these primitive data types and operations are exported by the 
 library <literal>GHC.Prim</literal>, for which there is 
-<ulink url="../libraries/ghc-prim/GHC-Prim.html">detailed online documentation</ulink>.
+<ulink url="&libraryGhcPrimLocation;/GHC-Prim.html">detailed online documentation</ulink>.
 (This documentation is generated from the file <filename>compiler/prelude/primops.txt.pp</filename>.)
 </para>
 <para>
@@ -7489,7 +7489,7 @@ Assertion failures can be caught, see the documentation for the
 
       <para>Any extension from the <literal>Extension</literal> type defined in
        <ulink
-         url="../libraries/Cabal/Language-Haskell-Extension.html"><literal>Language.Haskell.Extension</literal></ulink>
+         url="&libraryCabalLocation;/Language-Haskell-Extension.html"><literal>Language.Haskell.Extension</literal></ulink>
        may be used.  GHC will report an error if any of the requested extensions are not supported.</para>
     </sect2>
 
@@ -8780,7 +8780,7 @@ r) ->
 <title>Special built-in functions</title>
 <para>GHC has a few built-in functions with special behaviour.  These
 are now described in the module <ulink
-url="../libraries/ghc-prim/GHC-Prim.html"><literal>GHC.Prim</literal></ulink>
+url="&libraryGhcPrimLocation;/GHC-Prim.html"><literal>GHC.Prim</literal></ulink>
 in the library documentation.</para>
 </sect1>
 
index 409d9d0..c973f47 100644 (file)
@@ -24,7 +24,7 @@ Packages
     a package.  All you need to do is write a simple configuration file, put a
     few files in the right places, and you have a package.  See the
     <ulink url="../Cabal/index.html">Cabal documentation</ulink>
-    for details, and also the Cabal libraries (<ulink url="../libraries/Cabal/Distribution-Simple.html">Distribution.Simple</ulink>,
+    for details, and also the Cabal libraries (<ulink url="&libraryCabalLocation;/Distribution-Simple.html">Distribution.Simple</ulink>,
     for example).</para>
 
   <sect2 id="using-packages">
@@ -1044,7 +1044,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
 
     <para>A package specification is a Haskell record; in particular, it is the
       record <ulink
-       url="../libraries/Cabal/Distribution-InstalledPackageInfo.html#%tInstalledPackageInfo">InstalledPackageInfo</ulink> in the module Distribution.InstalledPackageInfo, which is part of the Cabal package distributed with GHC.</para>
+       url="&libraryCabalLocation;/Distribution-InstalledPackageInfo.html#%tInstalledPackageInfo">InstalledPackageInfo</ulink> in the module Distribution.InstalledPackageInfo, which is part of the Cabal package distributed with GHC.</para>
 
     <para>An <literal>InstalledPackageInfo</literal> has a human
       readable/writable syntax.  The functions
@@ -1180,7 +1180,7 @@ haddock-html: /usr/share/doc/ghc/html/libraries/unix
        <listitem>
          <para>(string) The type of license under which this package is distributed.
            This field is a value of the <ulink
-       url="../libraries/Cabal/Distribution-License.html#t:License"><literal>License</literal></ulink> type.</para>
+       url="&libraryCabalLocation;/Distribution-License.html#t:License"><literal>License</literal></ulink> type.</para>
        </listitem>
       </varlistentry>
 
index 4e864f3..2f008ed 100644 (file)
@@ -61,9 +61,9 @@ the FFI with concurrency</ulink>.</para></listitem>
     papers</ulink> are an excellent introduction to what STM is, and how to use
     it.</para>
 
-   <para>The main library you need to use STM is <ulink
-  url="../libraries/stm/Control-Concurrent-STM.html">
-             Control.Concurrent.STM</ulink>. The main features supported are these:
+   <para>The main library you need to use is the <ulink
+  url="http://hackage.haskell.org/package/stm">
+             stm library</ulink>. The main features supported are these:
 <itemizedlist>
 <listitem><para>Atomic blocks.</para></listitem>
 <listitem><para>Transactional variables.</para></listitem>
@@ -109,8 +109,8 @@ All these features are described in the papers mentioned earlier.
     One way to do so is forking threads using Concurrent Haskell (<xref
     linkend="concurrent-haskell"/>), but the simplest mechanism for extracting parallelism from pure code is
       to use the <literal>par</literal> combinator, which is closely related to (and often used
-      with) <literal>seq</literal>.  Both of these are available from <ulink
-       url="../libraries/parallel/Control-Parallel.html"><literal>Control.Parallel</literal></ulink>:</para>
+      with) <literal>seq</literal>.  Both of these are available from the <ulink
+       url="http://hackage.haskell.org/package/parallel">parallel library</ulink>:</para>
 
 <programlisting>
 infixr 0 `par`
@@ -177,8 +177,9 @@ nfib n | n &#60;= 1 = 1
       statistics; see <xref linkend="rts-options-gc" />.</para>
 
     <para>More sophisticated combinators for expressing parallelism are
-      available from the <ulink
-       url="../libraries/parallel/Control-Parallel-Strategies.html"><literal>Control.Parallel.Strategies</literal></ulink> module.
+      available from the <literal>Control.Parallel.Strategies</literal>
+      module in the <ulink
+       url="http://hackage.haskell.org/package/parallel">parallel package</ulink>.
       This module builds functionality around <literal>par</literal>,
       expressing more elaborate patterns of parallel computation, such as
       parallel <literal>map</literal>.</para>
index a69b2a0..eb1dd0f 100644 (file)
@@ -21,4 +21,6 @@
 <!ENTITY win32-dll      SYSTEM "win32-dlls.xml">
 <!ENTITY ffi-chap       SYSTEM "ffi-chap.xml">
 <!ENTITY shared_libs    SYSTEM "shared_libs.xml">
-<!ENTITY libraryBaseLocation "../libraries/base-@LIBRARY_base_VERSION@">
+<!ENTITY libraryBaseLocation    "../libraries/base-@LIBRARY_base_VERSION@">
+<!ENTITY libraryCabalLocation   "../libraries/Cabal-@LIBRARY_Cabal_VERSION@">
+<!ENTITY libraryGhcPrimLocation "../libraries/ghc-prim-@LIBRARY_ghc_prim_VERSION@">