[project @ 2003-05-30 09:04:28 by simonmar]
[ghc-hetmet.git] / ghc / docs / users_guide / 6.0-notes.sgml
1 <sect1 id="release-6-0">
2   <title>Release notes for version 6.0</title>
3
4   <sect2>
5     <title>User-visible compiler changes</title>
6     <itemizedlist>
7       <listitem>
8         <para>Template Haskell, a new feature for compile-time
9         metaprogramming has been introduced.  See <xref
10         linkend="template-haskell">.</para>
11       </listitem>
12       <listitem>
13         <para>INLINE pragmas on methods in class or instance
14         declarations now work properly.</para>
15       </listitem>
16       <listitem>
17         <para>Recursive do-notation (aka <literal>mdo</literal>) is
18         now supported.  See <xref linkend="mdo-notation">.</para>
19       </listitem>
20       <listitem>
21         <para>There is now a native code generator for PowerPC
22         platforms.</para>
23       </listitem>
24       <listitem>
25         <para>Profiling: the <option>-xt</option> RTS option enables
26         inclusion of thread stacks in a heap profile.  See <xref
27         linkend="rts-options-heap-prof">.</para>
28       </listitem>
29       <listitem>
30         <para>Non-blocking I/O is now supported on Windows.</para>
31       </listitem>
32       <listitem>
33         <para>The <ulink url="../base/Data.Dynamic.html#Typeable"><literal>Typeable</literal></ulink> class can now be
34         derived, and the implementation of <literal>Typeable</literal>
35         is now more efficient.</para>
36       </listitem>
37     </itemizedlist>
38   </sect2>
39   
40   <sect2>
41     <title>User-visible interpreter (GHCi) changes</title>
42     <itemizedlist>
43       <listitem>
44         <para>Loading a <literal>Main</literal> module that does not
45         define <literal>main</literal> is no longer an error, although
46         GHCi will still emit a warning in this case.</para>
47       </listitem>
48     </itemizedlist>
49   </sect2>
50
51   <sect2>
52     <title>User-visible library changes</title>
53     <itemizedlist>
54       <listitem>
55         <para>Hierarchical libraries are now available without needing
56         to specify an explicit <option>-package</option> flag.  There
57         are some exceptions to this rule (see <xref
58         linkend="using-packages">), but if you stick to GHCi and
59         <option>--make</option> mode then there will normally be no
60         need to specify <option>-package</option> options at
61         all.</para>
62
63         <para>Non-hierarchical libraries
64         (i.e. <literal>hslibs</literal> libraries) still need to be
65         explicitly requested with <option>-package</option>
66         options.</para>
67       </listitem>
68
69       <listitem>
70         <para>The <literal>Posix</literal> library has been rewritten.
71         It is now a hierarchical library rooted at
72         <literal>System.Posix</literal>, and has some additions aimed
73         at supporting the latest revision of the POSIX standard (IEEE
74         Std 1003.1-2001).  See the <ulink
75         url="../unix/index.html"><literal>unix</literal>
76         package</ulink> for details.</para>
77
78         <para>The old <literal>posix</literal> package is still
79         available for backwards compatibility, but is deprecated and
80         will be removed in a future release.</para>
81       </listitem>
82
83       <listitem>
84         <para><ulink url="../base/Data.IORef.html"><literal>Data.IORef</literal></ulink>: Added <literal>atomicModifyIORef</literal>.</para>
85       </listitem>
86
87       <listitem>
88         <para><ulink url="../base/System.Cmd.html"><literal>System.Cmd</literal></ulink>: Added <literal>rawSystem</literal>.</para>
89       </listitem>
90
91       <listitem>
92         <para><ulink
93         url="../base/System.Environment.html"><literal>System.Environment</literal></ulink>:
94         Added <literal>withArgs</literal> and <literal>withProgName</literal>.</para>
95       </listitem>
96
97       <listitem>
98         <para><ulink
99         url="../network/Network.Socket.html"><literal>Network.Socket</literal></ulink>:
100         Added <literal>sendFd</literal> and <literal>recvFd</literal>.</para>
101       </listitem>
102
103       <listitem>
104         <para>The <literal>Readline</literal> library has moved to
105         <ulink
106         url="../readline/System.Console.Readline.html"><literal>System.Console.Readline</literal></ulink>,
107         and is in a package of its own
108         (<literal>readline</literal>).</para>
109       </listitem>
110
111       <listitem>
112         <para>The non-hierarchical versions of the FFI libraries are
113         now all available without needing to specify <literal>-package
114         lang</literal> (they are actually now in the
115         <literal>haskell98</literal> package, which is available by
116         default).</para>
117       </listitem>
118
119       <listitem>
120         <para><ulink
121         url="../network/Network.BSD.html"><literal>Network.BSD</literal></ulink>:
122         <literal>symlink</literal> and <literal>readline</literal> are
123         now deprecated; use
124         <literal>System.Posix.createSymbolicLink</literal> and
125         <literal>System.Posix.readSymbolicLink</literal>
126         respectively.</para>
127       </listitem>
128
129       <listitem>
130         <para><ulink
131         url="../base/Control.Exception.html"><literal>Control.Exception</literal></ulink>:
132         Added <literal>mapException</literal>.</para>
133       </listitem>
134
135       <listitem>
136         <para><ulink
137         url="../base/Data.Dynamic.html"><literal>Data.Dynamic</literal></ulink>:
138         various changes to make the implementation of
139         <literal>Typeable</literal> more efficient.  This entails some
140         changes to the interface, and affects how instances of
141         <literal>Typeable</literal> are defined.</para>
142       </listitem>
143
144       <listitem>
145         <para><ulink
146         url="../base/Data.Tree.html"><literal>Data.Tree</literal></ulink>
147         is a new library for trees.</para>
148       </listitem>
149
150       <listitem>
151         <para><ulink
152         url="../base/Data.Graph.html"><literal>Data.Graph</literal></ulink>
153         is a new library for graphs.</para>
154       </listitem>
155
156       <listitem>
157         <para><ulink
158         url="../base/System.IO.html"><literal>System.IO</literal></ulink>:
159         Removed <literal>bracket</literal> and
160         <literal>bracket_</literal> (use the versions from
161         <literal>Control.Exception</literal> instead).</para>
162       </listitem>
163
164       <listitem>
165         <para><ulink
166         url="../base/System.IO.html"><literal>System.IO</literal></ulink>:
167         The <literal>IOError</literal> type is now a synonym for
168         <literal>IOException</literal>, whereas previously it was a
169         synonym for <literal>Exception</literal>.  This has various
170         consequences, one of which is that the types of
171         <literal>System.IO.catch</literal> and
172         <literal>Control.Exception.catch</literal> are now different
173         (useful, because they do different things).</para>
174       </listitem>
175
176       <listitem>
177         <para><ulink
178         url="../base/System.IO.Error.html"><literal>System.IO.Error</literal></ulink>:
179         added <literal>annotateIOError</literal>,
180         <literal>modifyIOError</literal>, and <literal>ioeSet{ErrorType,ErrorString,Handle,FileName}</literal>.</para>
181       </listitem>
182
183       <listitem>
184         <para><ulink
185         url="../base/Text.ParserCombinators.ReadP.html"><literal>Text.ParserCombinators.ReadP</literal></ulink>:
186         lots of updates.</para>
187       </listitem>
188
189       <listitem>
190         <para><literal>Control.Monad.Monoid</literal> is now <ulink url="../base/Data.Monoid.html"><literal>Data.Monoid</literal></ulink>.</para>
191       </listitem>
192
193       <listitem>
194         <para><ulink
195         url="../base/Data.PackedString.html"><literal>Data.PackedString</literal></ulink>:
196         added <literal>joinPS</literal>, <literal>unwordsPS</literal>
197         and <literal>unlinesPS</literal>.</para>
198       </listitem>
199
200       <listitem>
201         <para><ulink
202         url="../base/Data.HashTable.html"><literal>Data.HashTable</literal></ulink>
203         is a new dynamic hash-table implementation.</para>
204       </listitem>
205
206       <listitem>
207         <para>Added <ulink
208         url="../unix/System.Sendfile.html"><literal>System.Sendfile</literal></ulink>.</para>
209       </listitem>
210
211       <listitem>
212         <para>Added <ulink
213         url="../base/Foreign.Marshal.Pool.html"><literal>Foreign.Marshal.Pool</literal></ulink>.</para>
214       </listitem>
215
216       <listitem>
217         <para><ulink
218         url="../base/Data.Bits.html"><literal>Data.Bits</literal></ulink>:
219         <literal>shiftL</literal>, <literal>shiftR</literal>,
220         <literal>rotateL</literal>, and <literal>rotateR</literal> are
221         now methods of the <literal>Bite</literal> class.</para>
222       </listitem>
223
224       <listitem>
225         <para>The FFI libraries now conform to the latest version of
226         the FFI spec:</para>
227         <itemizedlist>
228           <listitem>
229             <para>Added <ulink
230             url="../base/Foreign.ForeignPtr.html#mallocForeignPtr"><literal>Foreign.ForeignPtr.mallocForeignPtr</literal></ulink>
231             and friends.</para>
232           </listitem>
233           <listitem>
234             <para>Finalizers added to a <literal>ForeignPtr</literal>
235             with <literal>addForeignPtrFinalizer</literal> are now run
236             in strict order; namely the reverse of the order they were
237             added.</para>
238           </listitem>
239           <listitem>
240             <para><literal>Foreign.C.TypesISO</literal> has been
241             merged into <ulink
242             url="../base/Foreign.C.Types.html"><literal>Foreign.C.Types</literal></ulink>.</para>
243           </listitem>
244         </itemizedlist>
245       </listitem>
246     </itemizedlist>
247   </sect2>
248
249   <sect2>
250     <title>Experimental features</title>
251     <itemizedlist>
252       <listitem>
253         <para>The <literal>Data</literal> class provides for generic
254         data traversals and folds; see <ulink
255         url="../base/Data.Generics.html"><literal>Data.Generics</literal></ulink>.
256         <literal>Data</literal> can be derived for arbitrary
257         datatypes.  The <literal>Data</literal> class is still
258         experimental, so its contents may change in the future.</para>
259       </listitem>
260       <listitem>
261         <para>Several bugs have been fixed in the threaded RTS, and it
262         should now be rather more robust (it should still be
263         considered experimental, however).</para>
264       </listitem>
265     </itemizedlist>
266   </sect2>
267
268   <sect2>
269     <title>Internal changes</title>
270     <itemizedlist>
271       <listitem>
272         <para>Sweeping changes to the compiler and runtime system to
273         change the evaluation model from <quote>push/enter</quote> to
274         <quote>eval/apply</quote>.  The bottom line is that the
275         compiler is now more portable and some of the complexity is
276         now more centralised, while performance and binary sizes
277         remain about the same.</para>
278         
279         <para>A paper describing these changes can be found <ulink
280         url="http://research.microsoft.com/~simonpj/papers/eval-apply">here</ulink>.</para>
281       </listitem>
282       <listitem>
283         <para>The test suite is now driven by a Python script and is
284         rather more flexible and robust.  It now supports building
285         tests several different "ways", and as a result we now run
286         each test with optimisation, profiling, native code
287         generation, and GHCi in addition to the vanilla way.</para>
288       </listitem>
289       <listitem>
290         <para>The build system now supports bootstrapping the compiler
291         in a single build tree.  By default, typing
292         <literal>make</literal> at the top level will bootstrap the
293         compiler once to create a stage-2 compiler.  See the Building
294         Guide for more details.</para>
295       </listitem>
296       <listitem>
297         <para>The RTS debugging flags are no longer represented by a
298         bitfield and now have single-character names.  For example, to
299         turn on scheduler debugging output, use <literal>-Ds</literal>
300         rather than <literal>-D1</literal>.</para>
301       </listitem>
302       <listitem>
303         <para>The compiler no longer requires any packages from
304         <literal>hslibs</literal> to bootstrap.  It is enough to
305         compile <literal>fptools/libraries</literal> before building
306         the stage 2 compiler.</para>
307       </listitem>
308     </itemizedlist>
309   </sect2>
310
311 </sect1>
312
313 <!-- Emacs stuff:
314      ;;; Local Variables: ***
315      ;;; mode: sgml ***
316      ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***
317      ;;; End: ***
318  -->