1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-6-0">
3 <title>Release notes for version 6.0</title>
6 <title>User-visible compiler changes</title>
9 <para>Template Haskell, a new feature for compile-time
10 metaprogramming has been introduced. See <xref
11 linkend="template-haskell"/>.</para>
14 <para>INLINE pragmas on methods in class or instance
15 declarations now work properly.</para>
18 <para>Recursive do-notation (aka <literal>mdo</literal>) is
19 now supported. See <xref linkend="mdo-notation"/>.</para>
22 <para>There is now a native code generator for PowerPC
26 <para>Profiling: the <option>-xt</option> RTS option enables
27 inclusion of thread stacks in a heap profile. See <xref
28 linkend="rts-options-heap-prof"/>.</para>
31 <para>Non-blocking I/O is now supported on Windows.</para>
34 <para>The <ulink url="../libraries/base/Data.Dynamic.html#Typeable"><literal>Typeable</literal></ulink> class can now be
35 derived, and the implementation of <literal>Typeable</literal>
36 is now more efficient.</para>
42 <title>User-visible interpreter (GHCi) changes</title>
45 <para>Loading a <literal>Main</literal> module that does not
46 define <literal>main</literal> is no longer an error, although
47 GHCi will still emit a warning in this case.</para>
53 <title>User-visible library changes</title>
56 <para>Hierarchical libraries are now available without needing
57 to specify an explicit <option>-package</option> flag. There
58 are some exceptions to this rule (see <xref
59 linkend="using-packages"/>), but if you stick to GHCi and
60 <option>--make</option> mode then there will normally be no
61 need to specify <option>-package</option> options at
64 <para>Non-hierarchical libraries
65 (i.e. <literal>hslibs</literal> libraries) still need to be
66 explicitly requested with <option>-package</option>
71 <para>The <literal>Posix</literal> library has been rewritten.
72 It is now a hierarchical library rooted at
73 <literal>System.Posix</literal>, and has some additions aimed
74 at supporting the latest revision of the POSIX standard (IEEE
75 Std 1003.1-2001). See the <ulink
76 url="../libraries/unix/index.html"><literal>unix</literal>
77 package</ulink> for details.</para>
79 <para>The old <literal>posix</literal> package is still
80 available for backwards compatibility, but is deprecated and
81 will be removed in a future release.</para>
85 <para><ulink url="../libraries/base/Data.IORef.html"><literal>Data.IORef</literal></ulink>: Added <literal>atomicModifyIORef</literal>.</para>
89 <para><ulink url="../libraries/base/System.Cmd.html"><literal>System.Cmd</literal></ulink>: Added <literal>rawSystem</literal>.</para>
94 url="../libraries/base/System.Environment.html"><literal>System.Environment</literal></ulink>:
95 Added <literal>withArgs</literal> and <literal>withProgName</literal>.</para>
100 url="../libraries/network/Network.Socket.html"><literal>Network.Socket</literal></ulink>:
101 Added <literal>sendFd</literal> and <literal>recvFd</literal>.</para>
105 <para>The <literal>Readline</literal> library has moved to
107 url="../libraries/readline/System.Console.Readline.html"><literal>System.Console.Readline</literal></ulink>,
108 and is in a package of its own
109 (<literal>readline</literal>).</para>
113 <para>The non-hierarchical versions of the FFI libraries are
114 now all available without needing to specify <literal>-package
115 lang</literal> (they are actually now in the
116 <literal>haskell98</literal> package, which is available by
122 url="../libraries/network/Network.BSD.html"><literal>Network.BSD</literal></ulink>:
123 <literal>symlink</literal> and <literal>readline</literal> are
125 <literal>System.Posix.createSymbolicLink</literal> and
126 <literal>System.Posix.readSymbolicLink</literal>
132 url="../libraries/base/Control.Exception.html"><literal>Control.Exception</literal></ulink>:
133 Added <literal>mapException</literal>.</para>
138 url="../libraries/base/Data.Dynamic.html"><literal>Data.Dynamic</literal></ulink>:
139 various changes to make the implementation of
140 <literal>Typeable</literal> more efficient. This entails some
141 changes to the interface, and affects how instances of
142 <literal>Typeable</literal> are defined.</para>
147 url="../libraries/base/Data.Tree.html"><literal>Data.Tree</literal></ulink>
148 is a new library for trees.</para>
153 url="../libraries/base/Data.Graph.html"><literal>Data.Graph</literal></ulink>
154 is a new library for graphs.</para>
159 url="../libraries/base/System.IO.html"><literal>System.IO</literal></ulink>:
160 Removed <literal>bracket</literal> and
161 <literal>bracket_</literal> (use the versions from
162 <literal>Control.Exception</literal> instead).</para>
167 url="../libraries/base/System.IO.html"><literal>System.IO</literal></ulink>:
168 The <literal>IOError</literal> type is now a synonym for
169 <literal>IOException</literal>, whereas previously it was a
170 synonym for <literal>Exception</literal>. This has various
171 consequences, one of which is that the types of
172 <literal>System.IO.catch</literal> and
173 <literal>Control.Exception.catch</literal> are now different
174 (useful, because they do different things).</para>
179 url="../libraries/base/System.IO.Error.html"><literal>System.IO.Error</literal></ulink>:
180 added <literal>annotateIOError</literal>,
181 <literal>modifyIOError</literal>, and <literal>ioeSet{ErrorType,ErrorString,Handle,FileName}</literal>.</para>
186 url="../libraries/base/Text.ParserCombinators.ReadP.html"><literal>Text.ParserCombinators.ReadP</literal></ulink>:
187 lots of updates.</para>
191 <para><literal>Control.Monad.Monoid</literal> is now <ulink url="../libraries/base/Data.Monoid.html"><literal>Data.Monoid</literal></ulink>.</para>
196 url="../libraries/base/Data.PackedString.html"><literal>Data.PackedString</literal></ulink>:
197 added <literal>joinPS</literal>, <literal>unwordsPS</literal>
198 and <literal>unlinesPS</literal>.</para>
203 url="../libraries/base/Data.HashTable.html"><literal>Data.HashTable</literal></ulink>
204 is a new dynamic hash-table implementation.</para>
209 url="../libraries/unix/System.Sendfile.html"><literal>System.Sendfile</literal></ulink>.</para>
214 url="../libraries/base/Foreign.Marshal.Pool.html"><literal>Foreign.Marshal.Pool</literal></ulink>.</para>
219 url="../libraries/base/Data.Bits.html"><literal>Data.Bits</literal></ulink>:
220 <literal>shiftL</literal>, <literal>shiftR</literal>,
221 <literal>rotateL</literal>, and <literal>rotateR</literal> are
222 now methods of the <literal>Bite</literal> class.</para>
226 <para>The FFI libraries now conform to the latest version of
231 url="../libraries/base/Foreign.ForeignPtr.html#mallocForeignPtr"><literal>Foreign.ForeignPtr.mallocForeignPtr</literal></ulink>
235 <para>Finalizers added to a <literal>ForeignPtr</literal>
236 with <literal>addForeignPtrFinalizer</literal> are now run
237 in strict order; namely the reverse of the order they were
241 <para><literal>Foreign.C.TypesISO</literal> has been
243 url="../libraries/base/Foreign.C.Types.html"><literal>Foreign.C.Types</literal></ulink>.</para>
251 <title>Experimental features</title>
254 <para>The <literal>Data</literal> class provides for generic
255 data traversals and folds; see <ulink
256 url="../libraries/base/Data.Generics.html"><literal>Data.Generics</literal></ulink>.
257 <literal>Data</literal> can be derived for arbitrary
258 datatypes. The <literal>Data</literal> class is still
259 experimental, so its contents may change in the future.</para>
262 <para>Several bugs have been fixed in the threaded RTS, and it
263 should now be rather more robust (it should still be
264 considered experimental, however).</para>
270 <title>Internal changes</title>
273 <para>Sweeping changes to the compiler and runtime system to
274 change the evaluation model from <quote>push/enter</quote> to
275 <quote>eval/apply</quote>. The bottom line is that the
276 compiler is now more portable and some of the complexity is
277 now more centralised, while performance and binary sizes
278 remain about the same.</para>
280 <para>A paper describing these changes can be found <ulink
281 url="http://research.microsoft.com/~simonpj/papers/eval-apply">here</ulink>.</para>
284 <para>The test suite is now driven by a Python script and is
285 rather more flexible and robust. It now supports building
286 tests several different "ways", and as a result we now run
287 each test with optimisation, profiling, native code
288 generation, and GHCi in addition to the vanilla way.</para>
291 <para>The build system now supports bootstrapping the compiler
292 in a single build tree. By default, typing
293 <literal>make</literal> at the top level will bootstrap the
294 compiler once to create a stage-2 compiler. See the Building
295 Guide for more details.</para>
298 <para>The RTS debugging flags are no longer represented by a
299 bitfield and now have single-character names. For example, to
300 turn on scheduler debugging output, use <literal>-Ds</literal>
301 rather than <literal>-D1</literal>.</para>
304 <para>The compiler no longer requires any packages from
305 <literal>hslibs</literal> to bootstrap. It is enough to
306 compile <literal>fptools/libraries</literal> before building
307 the stage 2 compiler.</para>
315 ;;; Local Variables: ***
317 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter" "sect1") ***