New syntax for GADT-style record declarations, and associated refactoring
[ghc-hetmet.git] / docs / users_guide / 6.6-notes.xml
index 0c818ba..a04b99e 100644 (file)
           when you compile with <option>-threaded</option>, you now get
           an RTS flag <option>-N</option> that allows you to specify the
           number of OS threads that GHC should use. Defaults to 1.
           when you compile with <option>-threaded</option>, you now get
           an RTS flag <option>-N</option> that allows you to specify the
           number of OS threads that GHC should use. Defaults to 1.
-          See <xref linkend="sec-using-smp" /> and <xref
+          See <xref linkend="using-smp" /> and <xref
           linkend="lang-parallel" />.
         </para>
       </listitem>
       <listitem>
         <para>
           linkend="lang-parallel" />.
         </para>
       </listitem>
       <listitem>
         <para>
-          GHC's modules are now also bundled into a
-          <literal>ghc</literal> package, allowing programs to make use
-          of GHC as a library. The interface has not yet been properly
-          designed, so is subject to change.
+          GHC now handles impredicative polymorphism; see <xref linkend="impredicative-polymorphism" />.
         </para>
       </listitem>
       <listitem>
         <para>
         </para>
       </listitem>
       <listitem>
         <para>
-          GHC now handles impredicative polymorphism and there are
-          changes to the way scoped type variables work; see
-          <ulink url="http://www.haskell.org/pipermail/glasgow-haskell-users/2006-January/009565.html"> Simon's e-mail</ulink>
-          for more details.
+         There are significant changes to the way scoped type variables work,
+         and some programs that used to compile may no longer do so.
+         The new story is documented in  <xref linkend="scoped-type-variables" />.
+          (<ulink url="http://www.haskell.org/pipermail/glasgow-haskell-users/2006-January/009565.html"> Simon's e-mail</ulink>
+          gives some background, but the user manual should be complete (tell
+          us if not), and
+          certainly takes precedence if there is any conflict.)
         </para>
       </listitem>
       <listitem>
         </para>
       </listitem>
       <listitem>
@@ -41,6 +41,7 @@
           <programlisting>
     f (x, y) | x `seq` False = undefined
              | otherwise = [x,y]</programlisting>
           <programlisting>
     f (x, y) | x `seq` False = undefined
              | otherwise = [x,y]</programlisting>
+          See <xref linkend="bang-patterns" /> for more details.
         </para>
       </listitem>
       <listitem>
         </para>
       </listitem>
       <listitem>
           ignored in comments, so ASCII code with comments in, for
           example, Latin-1 will also work.
         </para>
           ignored in comments, so ASCII code with comments in, for
           example, Latin-1 will also work.
         </para>
+
+        <para>
+          A way to have Latin-1 source files pre-processed by GHC is
+          described in <xref linkend="pre-processor" />.
+        </para>
       </listitem>
       <listitem>
         <para>
       </listitem>
       <listitem>
         <para>
           performance when a lot of memory is taken up by
           <literal>STArray</literal>s, <literal>IOArray</literal>s,
           <literal>STRef</literal>s or <literal>IORef</literal>s.
           performance when a lot of memory is taken up by
           <literal>STArray</literal>s, <literal>IOArray</literal>s,
           <literal>STRef</literal>s or <literal>IORef</literal>s.
+          For more details see
+          <ulink url="http://hackage.haskell.org/trac/ghc/ticket/650">trac bug #650</ulink>.
         </para>
       </listitem>
       <listitem>
         </para>
       </listitem>
       <listitem>
             The following flags (and, where appropriate, their inverses)
             used to be static (can only be given on
             the command line) but are now dynamic (can also be given in
             The following flags (and, where appropriate, their inverses)
             used to be static (can only be given on
             the command line) but are now dynamic (can also be given in
-            a <literal>GHC_OPTIONS</literal> pragma or with
+            an <literal>OPTIONS_GHC</literal> pragma or with
             <literal>:set</literal> in GHCi):
             <option>-c</option>,
             <option>-hcsuf</option>,
             <literal>:set</literal> in GHCi):
             <option>-c</option>,
             <option>-hcsuf</option>,
             <option>-pgma</option>,
             <option>-pgml</option>,
             <option>-pgmdll</option>,
             <option>-pgma</option>,
             <option>-pgml</option>,
             <option>-pgmdll</option>,
-            <option>-pgmdep</option>,
             <option>-pgmF</option>,
             <option>-optl</option>,
             <option>-optdll</option>,
             <option>-pgmF</option>,
             <option>-optl</option>,
             <option>-optdll</option>,
       </listitem>
       <listitem>
         <para>
       </listitem>
       <listitem>
         <para>
+          The
+          <option>-no-recomp</option><indexterm><primary><option>-no-recomp</option></primary></indexterm>
+          option is now called
+          <option>-fforce-recomp</option><indexterm><primary><option>-fforce-recomp</option></primary></indexterm>.
+          (the old name is still accepted for backwards compatibility,
+          but will be removed in the future).
+        </para>
+      </listitem>
+      <listitem>
+        <para>
           The <option>-fglobalise-toplev-names</option>
           flag has been removed.
         </para>
           The <option>-fglobalise-toplev-names</option>
           flag has been removed.
         </para>
       </listitem>
       <listitem>
         <para>
       </listitem>
       <listitem>
         <para>
-          It is now possible, with the <literal>-I</literal> RTS flag,
-          to control the amount of idle time that happens before a major
-          GC is performed.
+          If the program is idle for a certain amount of time then GHC
+          will now take the opportunity to do a major garbage collection.
+          The amount of idle time that is required before that happens
+          is controlled by the new <literal>-I</literal> RTS flag.
+          There is more detail in <xref linkend="rts-options-gc" />.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          It is now possible to control the frequency that the RTS clock
+          ticks at with the new <literal>-V</literal> RTS flag. This is
+          normally handled automatically by other flags, but this flag
+          is needed if you want to increase the resolution of the time
+          profiler.
+          For more details see <xref linkend="rts-options-misc" />.
         </para>
       </listitem>
       <listitem>
         </para>
       </listitem>
       <listitem>
       </listitem>
       <listitem>
         <para>
       </listitem>
       <listitem>
         <para>
-          The <option>-split-objs</option> flag can now be used with
-          <option>--make</option>, and hence can be used by cabal.
+          The <option>-split-objs</option> flag, which when used to compile
+          libraries means executables using the library will be smaller,
+          can now be used with <option>--make</option> and hence
+          can be used by cabal.
+          See <xref linkend="options-linker" /> for more information.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Template Haskell used to have limited support for type signatures in 
+         patterns, but since that design is in flux for Haskell (let alone
+         Template Haskell), we've removed type signatures in patterns from
+         Template Haskell.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          GHC now supports postfix operators, as a simple generalisation of
+          left sections (<xref linkend="postfix-operators"/>).
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          Parallel arrays, as enabled by <literal>-fparr</literal>, no
+          longer work.  They'll be coming back shortly, in full glory.
         </para>
       </listitem>
     </itemizedlist>
         </para>
       </listitem>
     </itemizedlist>
           See <xref linkend="ghci-commands" /> for more information.
         </para>
       </listitem>
           See <xref linkend="ghci-commands" /> for more information.
         </para>
       </listitem>
+      <listitem>
+        <para>
+          GHCi now has an <literal>:edit</literal> command which pops
+          up an editor on the most recently loaded file, or a
+          specified file.  See <xref linkend="ghci-commands" /> for
+          more information.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          GHCi now invokes <literal>print</literal> by default on the
+          result of IO actions and bindings at the prompt.  This is
+          occasionally not what you want, so it can be disabled (at
+          least for bindings) with 
+          <literal>:set -fno-print-bind-result</literal>.  See <xref
+          linkend="ghci-stmts" />.</para>
+      </listitem>
     </itemizedlist>
   </sect2>
 
     </itemizedlist>
   </sect2>
 
       <itemizedlist>
         <listitem>
           <para>
       <itemizedlist>
         <listitem>
           <para>
-            Version number 2.0 (was 1.0).
+            Version number 2.1 (was 1.0).
           </para>
         </listitem>
         <listitem>
           </para>
         </listitem>
         <listitem>
             <literal>inline</literal> which, provided the RHS is visible
             to the compiler, forcibly inlines its argument.
             Otherwise, it acts like <literal>id</literal>.
             <literal>inline</literal> which, provided the RHS is visible
             to the compiler, forcibly inlines its argument.
             Otherwise, it acts like <literal>id</literal>.
+            For more details, see <xref linkend="special-ids" />.
           </para>
         </listitem>
         <listitem>
           <para>
             <literal>GHC.Exts</literal> now provides a function
           </para>
         </listitem>
         <listitem>
           <para>
             <literal>GHC.Exts</literal> now provides a function
-            <literal>lazy</literal> which forces GHC to think that its
-            argument is lazy in its first argument.
+            <literal>lazy</literal>, where <literal>lazy f</literal>
+            behaves like <literal>f</literal>, except GHC is forced
+            to believe that it is lazy in its first argument.
+            For more details, see <xref linkend="special-ids" />.
           </para>
         </listitem>
         <listitem>
           </para>
         </listitem>
         <listitem>
       <itemizedlist>
         <listitem>
           <para>
       <itemizedlist>
         <listitem>
           <para>
-            Version number 1.1.5 (was 1.1.4).
+            Version number 1.1.6 (was 1.1.4).
           </para>
         </listitem>
         <listitem>
           </para>
         </listitem>
         <listitem>
         </listitem>
         <listitem>
           <para>
         </listitem>
         <listitem>
           <para>
-            Added <filename>cabal-setup</filename>, a user interface to
-            building and installing Cabal packages.
-          </para>
-        </listitem>
-        <listitem>
-          <para>
-            Added <filename>cabal-install</filename>, an automated
-            installer for cabal packages.
-          </para>
-        </listitem>
-        <listitem>
-          <para>
-            There is now a <literal>Network.Hackage</literal> hierarchy
-            for code needed by hackage, the package server.
-          </para>
-        </listitem>
-        <listitem>
-          <para>
             There are now modules
             <literal>Distribution.Simple.<replaceable>compiler</replaceable></literal>
             for each of <literal>GHC</literal>, <literal>NHC</literal>,
             There are now modules
             <literal>Distribution.Simple.<replaceable>compiler</replaceable></literal>
             for each of <literal>GHC</literal>, <literal>NHC</literal>,
       <itemizedlist>
         <listitem>
           <para>
       <itemizedlist>
         <listitem>
           <para>
-            Version number 2.0 (was 1.0).
+            Version number 2.1 (was 1.0).
           </para>
         </listitem>
         <listitem>
           </para>
         </listitem>
         <listitem>
       <itemizedlist>
         <listitem>
           <para>
       <itemizedlist>
         <listitem>
           <para>
-            Version number 2.0 (was 1.0).
+            Version number 2.1 (was 1.0).
           </para>
         </listitem>
         <listitem>
           </para>
         </listitem>
         <listitem>
             <literal>network</literal> package.
           </para>
         </listitem>
             <literal>network</literal> package.
           </para>
         </listitem>
+        <listitem>
+          <para>
+            The <literal>Network.CGI.Compat</literal> module provides
+            a similar interface to the old <literal>Network.CGI</literal>
+            module, but it uses <literal>Text.XHtml</literal> rather than
+            <literal>Text.Html</literal>.
+          </para>
+        </listitem>
       </itemizedlist>
     </sect3>
 
       </itemizedlist>
     </sect3>
 
   </sect2>
 
   <sect2>
   </sect2>
 
   <sect2>
+    <title>GHC As A Library</title>
+      <para>
+        Version number 6.6.
+      </para>
+      <para>
+        The internal modules of GHC are now available as a library, package
+        name <literal>ghc</literal>.
+        The interface has not been designed with use by other programs
+        in mind, so expect the API to vary radically in future
+        releases.
+      </para>
+      <para>
+        An introduction to using the library can be found
+        <ulink url="http://www.haskell.org/haskellwiki/GHC/As_a_library">on the wiki</ulink>.
+      </para>
+  </sect2>
+
+  <sect2>
     <title>Internal changes</title>
     <itemizedlist>
       <listitem>
     <title>Internal changes</title>
     <itemizedlist>
       <listitem>