[project @ 2002-07-03 10:04:38 by simonmar]
[ghc-hetmet.git] / ghc / docs / users_guide / 5-04-notes.sgml
1 <sect1 id="release-5-04">
2   <title>Release notes for version 5.04</title>
3
4   <sect2>
5     <title>User-visible compiler changes</title>
6     <itemizedlist>
7       <listitem>
8         <para>MacOS X support (Wolfgang, please fill in).</para>
9       </listitem>
10       <listitem>
11         <para><literal>ghc-pkg</literal>: new options
12         <option>--auto-ghci-libs</option>,
13         <option>-u</option>/<option>--update-package</option>,
14         <option>--force</option>, and
15         <option>-i</option>/<option>--input-file</option>, and
16         suppport for expanding environment variables in package
17         descriptions.  See <xref linkend="packages">).</para>
18       </listitem>
19       <listitem>
20         <para>The latest version of the FFI spec is fully supported.
21         The syntax of FFI declarations has changed accordingly.  The
22         old syntax is still accepted for the time being, but will
23         elicit a warning from the compiler.</para>
24       </listitem>
25       <listitem>
26         <para>New option: <option>-F</option> specifies a user-defined
27         preprocessing phase (see <xref linkend="pre-processor">).</para>
28       </listitem>
29       <listitem>
30         <para>Major overhaul of the heap profiling subsystem, with new
31         facilities for retainer profiling and biographical profiling
32         (ala nhc98, albeit with a couple of omissions).  The syntax of
33         the runtime heap-profiling options has changed.  See <xref
34         linkend="prof-heap">.</para>
35       </listitem>
36       <listitem>
37         <para>The type system now supports full rank-N types
38         (previously only limited rank-2 types were supported).  See
39         <xref linkend="universal-quantification">.</para>
40       </listitem>
41       <listitem>
42         <para>Explicit kind annotations can now be given on any
43         binding occurrence of a type variable.  See <xref
44         linkend="sec-kinding">.</para>
45       </listitem>
46       <listitem>
47         <para>The handling of type synonyms has been rationalised.
48         See <xref linkend="type-synonyms">.</para>
49       </listitem>
50       <listitem>
51         <para>Fixes for several space leaks in the compiler itself
52         (these fixes were also merged into 5.02.3).</para>
53       </listitem>
54       <listitem>
55         <para>It is now possible to derive arbitrary classes for
56         newtypes.  See <xref linkend="newtype-deriving">.</para>
57       </listitem>
58       <listitem>
59         <para>Deadlock is now an exception, rather than a return
60         status from the scheduler.  See the module
61         <literal>Control.Exception</literal> in the library
62         documentation for more details.</para>
63       </listitem>
64       <listitem>
65         <para>The syntax and behaviour of <literal>RULE</literal>
66         pragmas has changed slightly.  See <xref
67         linkend="rewrite-rules">.</para>
68       </listitem>
69       <listitem>
70         <para>Interface files are now in a binary format to reduce
71         compilation times.  To view an interface file in plain text,
72         use the <option>--show-iface</option> flag.</para>
73       </listitem>
74       <listitem>
75         <para>A restriction on the form of class declarations has been
76         lifted.  In Haskell 98, it is illegal for class method types
77         to mention constraints on the class type variable.  eg.</para>
78
79 <programlisting>
80    class Seq s a where
81       elem     :: Eq a => a -> s a -> Bool
82 </programlisting>
83         
84         <para>This restriction has now been lifted in GHC.</para>
85       </listitem>
86       <listitem>
87         <para>Main threads can now receive the
88         <literal>BlockedOnDeadMVar</literal> exception in the same way
89         as other threads.</para>
90       </listitem>
91       <listitem>
92         <para>The <option>-fall-strict</option> flag never really
93         worked, and has been removed.</para>
94       </listitem>
95       <listitem>
96         <para>The syntax of <literal>.hi-boot</literal> files is now
97         much clearer and Haskell-like.  See <xref
98         linkend="mutual-recursion">.</para>
99       </listitem>
100       <listitem>
101         <para>There is a new flag <option>-fffi</option> which enables
102         FFI support without turning on the rest of the GHC
103         extensions.</para>
104       </listitem>
105       <listitem>
106         <para>The syntax for implicit parameter bindings has changed.
107         Previously the keyword <literal>with</literal> was used to
108         introduce implicit bindings, but now implicit bindings may be
109         introduced using <literal>let</literal> (see <xref
110         linkend="implicit-parameters">).  As a result of this,
111         <literal>with</literal> is no longer a keyword when
112         <option>-fglasgow-exts</option> is turned on.</para>
113         
114         <para>The option <literal>-fwith</literal> may be used to
115         restore the old behaviour.</para>
116       </listitem>
117       <listitem>
118         <para>Infix type constructors are now allowed, and must begin
119         with a colon (as with data constructors).  See <xref
120         linkend="infix-tycons">.</para>
121       </listitem>
122       <listitem>
123         <para>The <literal>do</literal>-notation syntax is now
124         rebindable in the same way as other built-in syntax.  See
125         <xref linkend="rebindable-syntax">.</para>
126       </listitem>
127       <listitem>
128         <para>Support for using &ldquo;frameworks&rdquo; on
129         Darwin/MacOS X has been added.  See the
130         <option>-framework</option> option in <xref
131         linkend="options-linker">, and the
132         <literal>framework_dirs</literal> field of a package spec in
133         <xref linkend="package-management">.</para>
134       </listitem>
135     </itemizedlist>
136   </sect2>
137   
138   <sect2>
139     <title>User-visible interpreter (GHCi) changes</title>
140     <itemizedlist>
141       <listitem>
142         <para>New commands: <literal>:browse</literal>, <literal>:set
143         args</literal>, <literal>:set prog</literal>, <literal>:show
144         binadings</literal>, and <literal>:show modules</literal> (see
145         <xref linkend="ghci-commands">).</para>
146       </listitem>
147       <listitem>
148         <para>There is a much more flexible mechanism for manipulating
149         the scope for expressions typed at the prompt.  For example,
150         one can now have both the <literal>Prelude</literal> and the
151         exports of several compiled modules in scope at the same
152         time.  See <xref linkend="ghci-scope">.</para>
153       </listitem>
154       <listitem>
155         <para>GHCi now supports <literal>foreign import
156         "wrapper"</literal> FFI declarations.</para>
157       </listitem>
158     </itemizedlist>
159   </sect2>
160   
161   <sect2>
162     <title>User-visible library changes</title>
163     <itemizedlist>
164       <listitem>
165         <para>GHC is in the process of moving to a new hierarchical
166         set of libraries.  At the moment, we have two sets of
167         libraries, both described in accompanying documents:</para>
168         <itemizedlist>
169           <listitem>
170             <para>The &ldquo;new libraries&rdquo; which are
171             hierarchical and consist of the following packages:
172             <literal>base</literal>, <literal>haskell98</literal>,
173             <literal>haskell-src</literal>, and
174             <literal>network</literal>.  Broadly speaking,
175             <literal>base</literal> contains the
176             <literal>Prelude</literal>, standard libraries and most of
177             the contents of the old <literal>lang</literal>
178             package.  By default, the <literal>base</literal> and
179             <literal>haskell98</literal> packages are enabled.</para>
180           </listitem>
181
182           <listitem>
183             <para>The <literal>hslibs</literal>, most of which are now
184             deprecated.  Where possible, new code should be written to
185             use the new libraries instead. </para>
186
187             <para>The following libraries in <literal>hslibs</literal>
188             have not moved yet:</para>
189             <itemizedlist>
190               <listitem>
191                 <para>The packages <literal>win32</literal>,
192                 <literal>xlib</literal>, <literal>graphics</literal>,
193                 and <literal>posix</literal>.</para>
194               </listitem>
195               <listitem>
196                 <para>The Edison libraries in the
197                 <literal>data</literal> package.</para>
198               </listitem>
199               <listitem>
200                 <para>In the <literal>lang</literal> package, the
201                 modules <literal>TimeExts</literal>,
202                 <literal>DirectoryExts</literal>,
203                 <literal>SystemExts</literal>, and
204                 <literal>NumExts</literal>.</para>
205               </listitem>
206               <listitem>
207                 <para>The HaXml libraries in the
208                 <literal>text</literal> package.</para>
209               </listitem>
210               <listitem>
211                 <para>In the <literal>util</literal> package, the
212                 modules <literal>MD5</literal>,
213                 <literal>Select</literal>, <literal>Memo</literal>,
214                 <literal>Observe</literal>, and
215                 <literal>Readline</literal>.</para>
216               </listitem>
217             </itemizedlist>
218
219             <para>All other libraries from <literal>hslibs</literal>
220             either have equivalents in the new libraries (see the
221             <literal>hslibs</literal> docs for details), or were
222             already deprecated and hence were not moved into the new
223             hierarchy.</para>
224           </listitem>
225         </itemizedlist>
226       </listitem>
227       
228       <listitem>
229         <para>The <literal>Read</literal> class is now based on a
230         parsing combinator library which is vastly more efficient than
231         the previous one.  See the modules
232         <literal>Text.Read</literal>.
233         <literal>Text.ParserCombinators.ReadP</literal>, and
234         <literal>Text.ParserCombinators.ReadPrec</literal> in the
235         library documentation.</para>
236
237         <para>The code generated by the compiler for derived
238         <literal>Read</literal> instances should be much shorter than
239         before.</para>
240       </listitem>
241     </itemizedlist>
242   </sect2>
243
244   <sect2>
245     <title>New experimental features</title>
246     <itemizedlist>
247       <listitem>
248         <para>Linear implicit parameters.  See <xref
249         linkend="linear-implicit-parameters">.</para>
250       </listitem>
251       <listitem>
252         <para>The RTS has support for running in a multi-threaded
253         environment and making non-blocking (from Haskell's point of
254         view) calls to foreign C functions which would normally block.
255         To enable this behaviour, configure with the
256         <option>--enable-threaded-rts</option> option.</para>
257       </listitem>
258       <listitem>
259         <para>The compiler can now read in files containing Core
260         syntax (such as those produced by the
261         <option>-fext-core</option> option) and compile them.  This is
262         enabled with the <option>-fcore</option> flag.</para>
263       </listitem>
264     </itemizedlist>
265   </sect2>
266
267   <sect2>
268     <title>Internal changes</title>
269     <itemizedlist>
270       <listitem>
271         <para>Happy 1.13 is now required to build GHC, because of the
272         change in names of certain libraries.</para>
273       </listitem>
274     </itemizedlist>
275   </sect2>
276
277 </sect1>
278
279 <!-- Emacs stuff:
280      ;;; Local Variables: ***
281      ;;; mode: sgml ***
282      ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***
283      ;;; End: ***
284  -->