Improve documentation of INLINE pragmas
[ghc.git] / docs / users_guide / 6.0-notes.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-6-0">
3 <title>Release notes for version 6.0</title>
4
5 <sect2>
6 <title>User-visible compiler changes</title>
7 <itemizedlist>
8 <listitem>
9 <para>Template Haskell, a new feature for compile-time
10 metaprogramming has been introduced. See <xref
11 linkend="template-haskell"/>.</para>
12 </listitem>
13 <listitem>
14 <para>INLINE pragmas on methods in class or instance
15 declarations now work properly.</para>
16 </listitem>
17 <listitem>
18 <para>Recursive do-notation (aka <literal>mdo</literal>) is
19 now supported. See <xref linkend="mdo-notation"/>.</para>
20 </listitem>
21 <listitem>
22 <para>There is now a native code generator for PowerPC
23 platforms.</para>
24 </listitem>
25 <listitem>
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>
29 </listitem>
30 <listitem>
31 <para>Non-blocking I/O is now supported on Windows.</para>
32 </listitem>
33 <listitem>
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>
37 </listitem>
38 </itemizedlist>
39 </sect2>
40
41 <sect2>
42 <title>User-visible interpreter (GHCi) changes</title>
43 <itemizedlist>
44 <listitem>
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>
48 </listitem>
49 </itemizedlist>
50 </sect2>
51
52 <sect2>
53 <title>User-visible library changes</title>
54 <itemizedlist>
55 <listitem>
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
62 all.</para>
63
64 <para>Non-hierarchical libraries
65 (i.e. <literal>hslibs</literal> libraries) still need to be
66 explicitly requested with <option>-package</option>
67 options.</para>
68 </listitem>
69
70 <listitem>
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>
78
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>
82 </listitem>
83
84 <listitem>
85 <para><ulink url="../libraries/base/Data.IORef.html"><literal>Data.IORef</literal></ulink>: Added <literal>atomicModifyIORef</literal>.</para>
86 </listitem>
87
88 <listitem>
89 <para><ulink url="../libraries/base/System.Cmd.html"><literal>System.Cmd</literal></ulink>: Added <literal>rawSystem</literal>.</para>
90 </listitem>
91
92 <listitem>
93 <para><ulink
94 url="../libraries/base/System.Environment.html"><literal>System.Environment</literal></ulink>:
95 Added <literal>withArgs</literal> and <literal>withProgName</literal>.</para>
96 </listitem>
97
98 <listitem>
99 <para><ulink
100 url="../libraries/network/Network.Socket.html"><literal>Network.Socket</literal></ulink>:
101 Added <literal>sendFd</literal> and <literal>recvFd</literal>.</para>
102 </listitem>
103
104 <listitem>
105 <para>The <literal>Readline</literal> library has moved to
106 <ulink
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>
110 </listitem>
111
112 <listitem>
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
117 default).</para>
118 </listitem>
119
120 <listitem>
121 <para><ulink
122 url="../libraries/network/Network.BSD.html"><literal>Network.BSD</literal></ulink>:
123 <literal>symlink</literal> and <literal>readline</literal> are
124 now deprecated; use
125 <literal>System.Posix.createSymbolicLink</literal> and
126 <literal>System.Posix.readSymbolicLink</literal>
127 respectively.</para>
128 </listitem>
129
130 <listitem>
131 <para><ulink
132 url="../libraries/base/Control.Exception.html"><literal>Control.Exception</literal></ulink>:
133 Added <literal>mapException</literal>.</para>
134 </listitem>
135
136 <listitem>
137 <para><ulink
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>
143 </listitem>
144
145 <listitem>
146 <para><ulink
147 url="../libraries/base/Data.Tree.html"><literal>Data.Tree</literal></ulink>
148 is a new library for trees.</para>
149 </listitem>
150
151 <listitem>
152 <para><ulink
153 url="../libraries/base/Data.Graph.html"><literal>Data.Graph</literal></ulink>
154 is a new library for graphs.</para>
155 </listitem>
156
157 <listitem>
158 <para><ulink
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>
163 </listitem>
164
165 <listitem>
166 <para><ulink
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>
175 </listitem>
176
177 <listitem>
178 <para><ulink
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>
182 </listitem>
183
184 <listitem>
185 <para><ulink
186 url="../libraries/base/Text.ParserCombinators.ReadP.html"><literal>Text.ParserCombinators.ReadP</literal></ulink>:
187 lots of updates.</para>
188 </listitem>
189
190 <listitem>
191 <para><literal>Control.Monad.Monoid</literal> is now <ulink url="../libraries/base/Data.Monoid.html"><literal>Data.Monoid</literal></ulink>.</para>
192 </listitem>
193
194 <listitem>
195 <para><ulink
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>
199 </listitem>
200
201 <listitem>
202 <para><ulink
203 url="../libraries/base/Data.HashTable.html"><literal>Data.HashTable</literal></ulink>
204 is a new dynamic hash-table implementation.</para>
205 </listitem>
206
207 <listitem>
208 <para>Added <ulink
209 url="../libraries/unix/System.Sendfile.html"><literal>System.Sendfile</literal></ulink>.</para>
210 </listitem>
211
212 <listitem>
213 <para>Added <ulink
214 url="../libraries/base/Foreign.Marshal.Pool.html"><literal>Foreign.Marshal.Pool</literal></ulink>.</para>
215 </listitem>
216
217 <listitem>
218 <para><ulink
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>
223 </listitem>
224
225 <listitem>
226 <para>The FFI libraries now conform to the latest version of
227 the FFI spec:</para>
228 <itemizedlist>
229 <listitem>
230 <para>Added <ulink
231 url="../libraries/base/Foreign.ForeignPtr.html#mallocForeignPtr"><literal>Foreign.ForeignPtr.mallocForeignPtr</literal></ulink>
232 and friends.</para>
233 </listitem>
234 <listitem>
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
238 added.</para>
239 </listitem>
240 <listitem>
241 <para><literal>Foreign.C.TypesISO</literal> has been
242 merged into <ulink
243 url="../libraries/base/Foreign.C.Types.html"><literal>Foreign.C.Types</literal></ulink>.</para>
244 </listitem>
245 </itemizedlist>
246 </listitem>
247 </itemizedlist>
248 </sect2>
249
250 <sect2>
251 <title>Experimental features</title>
252 <itemizedlist>
253 <listitem>
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>
260 </listitem>
261 <listitem>
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>
265 </listitem>
266 </itemizedlist>
267 </sect2>
268
269 <sect2>
270 <title>Internal changes</title>
271 <itemizedlist>
272 <listitem>
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>
279
280 <para>A paper describing these changes can be found <ulink
281 url="http://research.microsoft.com/~simonpj/papers/eval-apply">here</ulink>.</para>
282 </listitem>
283 <listitem>
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>
289 </listitem>
290 <listitem>
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>
296 </listitem>
297 <listitem>
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>
302 </listitem>
303 <listitem>
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>
308 </listitem>
309 </itemizedlist>
310 </sect2>
311
312 </sect1>
313
314 <!-- Emacs stuff:
315 ;;; Local Variables: ***
316 ;;; mode: xml ***
317 ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter" "sect1") ***
318 ;;; End: ***
319 -->