Document that lazy I/O now throws exceptions
[ghc-hetmet.git] / docs / users_guide / 6.12.1-notes.xml
index e2c8884..9e0ecbf 100644 (file)
@@ -169,8 +169,9 @@ data instance T [a] where
         <para>
           The <literal>-#include</literal> flag and
           <literal>INCLUDE</literal> pragma are now deprecated and
-          ignored. GHC now generates its own C prototypes, rather than
-          relying on C prototypes.
+          ignored.  Since version 6.10.1, GHC has generated its own C
+          prototypes for foreign calls, rather than relying on
+          prototypes from C header files.
         </para>
       </listitem>
 
@@ -184,7 +185,8 @@ data instance T [a] where
       <listitem>
         <para>
           There is a new FFI calling convention called
-          <literal>prim</literal>, which allows calling C-- function.
+          <literal>prim</literal>, which allows calling C-- functions
+          (see <xref linkend="ffi-prim" />).
           Most users are not expected to need this.
         </para>
       </listitem>
@@ -213,16 +215,7 @@ data instance T [a] where
           block, but its result is not bound.
           The flags <literal>-fwarn-unused-do-bind</literal>
           and <literal>-fwarn-wrong-do-bind</literal> control
-          these warnings.
-        </para>
-      </listitem>
-
-      <listitem>
-        <para>
-          There is a new warning if a monadic result of type other than
-          <literal>m ()</literal> is not bound.
-          The flag <literal>-fwarn-unused-do-bind</literal> controls
-          this warning.
+          these warnings (see <xref linkend="options-sanity" />).
         </para>
       </listitem>
 
@@ -252,6 +245,10 @@ data instance T [a] where
 
   <sect2>
     <title>Runtime system</title>
+
+    <para>The following options are all described in
+      <xref linkend="rts-options-gc" />.</para>
+
     <itemizedlist>
       <listitem>
         <para>
@@ -263,31 +260,34 @@ data instance T [a] where
 
       <listitem>
         <para>
-          The new flag <literal>+RTS -q1</literal> disables the parallel
-          garbage collector.
+          The parallel GC now uses the same threads as the mutator,
+          with the consequence that you can no longer select a
+          different number of threads to use for GC.
+          The <option>-g<replaceable>n</replaceable></option> RTS
+          option has been removed, except that <option>-g1</option> is
+          still accepted for backwards compatibility.
         </para>
-      </listitem>
 
-      <listitem>
         <para>
           The new flag
-          <literal>+RTS -qg<replaceable>n</replaceable></literal>
-          sets the minimum generation for which parallel garbage
-          collection is used. Defaults to 1.
+          <literal>+RTS -qg<replaceable>gen</replaceable></literal> sets
+          the minimum generation for which parallel garbage collection
+          is used.  Defaults to 1.  The flag <literal>-qg</literal> on
+          its own disables parallel GC.
         </para>
       </listitem>
 
       <listitem>
         <para>
-          The new flag <literal>+RTS -qa</literal>
-          uses the OS to set thread affinity.
+          The new flag <literal>+RTS -qb<replaceable>gen</replaceable></literal>
+          controls load balancing in the parallel GC.
         </para>
       </listitem>
 
       <listitem>
         <para>
-          The new flag <literal>+RTS -qb</literal>
-          disables load balancing in the parallel garbage collector.
+          The new flag <literal>+RTS -qa</literal>
+          uses the OS to set thread affinity (experimental).
         </para>
       </listitem>
 
@@ -297,7 +297,7 @@ data instance T [a] where
           the new flag <literal>+RTS -l</literal> generates
           <literal><replaceable>prog</replaceable>.eventlog</literal>
           files, which tools such as ThreadScope can use to show the
-          behaviour of your program. The
+          behaviour of your program (see <xref linkend="rts-eventlog" />). The
           <literal>+RTS -D><replaceable>x</replaceable></literal> output
           is also sent to the eventlog file if this option is enabled.
           The <literal>+RTS -v</literal> flag sends eventlog data to
@@ -343,7 +343,7 @@ SPARKS: 1430 (2 converted, 1427 pruned)
         <para>
           In order to generate the parsers, happy >= 1.16 is now
           required. The parsers are pre-generated in the source tarball,
-          so most users will not need happy.
+          so most users will not need Happy.
         </para>
       </listitem>
 
@@ -512,12 +512,6 @@ Loaded: Prelude
                 Support PageUp and PageDown keys.
               </para>
             </listitem>
-
-            <listitem>
-              <para>
-                Let ctrl-L (clear-screen) work during getInputChar.
-              </para>
-            </listitem>
           </itemizedlist>
       </listitem>
     </itemizedlist>
@@ -577,8 +571,11 @@ deriveMyStuff ''T
         <para>
           Packages can now be identified by a "package ID", which is
           based on a hash of the ABIs. The new flag
-          <literal>-package-id</literal> allows packages to be selected
-          by this identifier.
+          <literal>-package-id</literal> allows packages to be
+          selected by this identifier (see <xref linkend="package-ids"
+          />).  Package IDs enable GHC to detect potential
+          incompatibilities between packages and broken dependencies
+          much more accurately than before.
         </para>
       </listitem>
 
@@ -610,6 +607,31 @@ ghc --abi-hash M1 M2 ...
           Rather than being a single <literal>package.conf</literal> file,
           package databases now consist of a directory containing one
           file per package, and a binary cache of the information.
+          GHC should be much faster to start up when the package
+          database grows large.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          There is a new command <literal>ghc-pkg init</literal> to
+          create a package database.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          There is a new command <literal>ghc-pkg dot</literal> to
+          generate a GraphViz graph of the dependencies between
+          installed packages.
+        </para>
+      </listitem>
+
+      <listitem>
+        <para>
+          There is a new command <literal>ghc-pkg recache</literal> to
+          update the package database cache should it become out of
+          date, or for registering packages manually.
         </para>
       </listitem>
     </itemizedlist>
@@ -670,6 +692,19 @@ ghc --abi-hash M1 M2 ...
 
         <listitem>
           <para>
+            Lazy I/O now throws an exception if an error is
+            encountered, in a divergence from the Haskell 98 spec which
+            requires that errors are discarded (see Section 21.2.2 of
+            the Haskell 98 report).  The exception thrown is the usual
+            IO exception that would be thrown if the failing IO
+            operation was performed in the IO monad, and can be caught
+            by <literal>System.IO.Error.catch</literal>
+            or <literal>Control.Exception.catch</literal>.
+          </para>
+        </listitem>
+
+        <listitem>
+          <para>
             It is now possible to create your own handles.
             For more information, see the
             <literal>GHC.IO.Handle</literal> haddock docs.