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