1 <sect1 id="release-5-02">
2 <title>Release notes for version 5.02</title>
5 <title>User-visible compiler changes</title>
10 <para>Majorly improved support for Windows platforms. Binary
11 builds are now entirely freestanding. There is no longer any
12 need to install Cygwin or Mingwin to use it. It's a
13 one-click-install-and-off-you-go story now.</para>
17 <para>Several small changes to bring GHC into line with the
18 newest Haskell 98 report.</para>
22 <para>RTS options can now be specified using the environment
23 variable <envar>GHCRTS</envar>.</para>
27 <para>The maximum heap size, set with
28 <literal>+RTS -M<replaceable>size</replaceable></literal>,
29 now defaults to unlimited. We recommend however that you set
30 a maximum heap size appropriate for your machine using the
31 <envar>GHCRTS</envar> variable.</para>
35 <para>Thanks to the heroic efforts of Ken Shan
36 <email>ken@digitas.harvard.edu</email>, GHC now works again on
37 the Alpha architecture (just Tru64 at the moment), and many
38 64-bit bugs have been shaken out. Interactive mode and the
39 native code generator do not currently work, sorry.</para>
43 <para>New option: <option>-fno-code</option> which causes GHC
44 to omit code generation and all future compilation stages (see
45 <xref linkend="options-codegen">).</para>
49 <para>New option <option>-package-conf
50 <replaceable>file</replaceable></option>. This makes GHC read
51 additional package descriptions from
52 <replaceable>file</replaceable>. See <xref
53 linkend="using-local-packages">.</para>
58 -i<replaceable>seconds</replaceable></option> flag reinstated for heap
59 profiling. See <xref linkend="prof-rts-options">.</para>
63 <para><option>-funbox-strict-fields</option> now works
64 correctly. See <xref linkend="options-f">.</para>
69 Many bug fixes related to implicit-parameter support.</para>
74 Data declarations with no constructors are allowed. This
75 facilitates types whose only value is bottom, and which have
76 no representation.</para>
81 You can disconnect numeric syntax from the Prelude syntax.
82 Doing this means you can define your own arithmetic. The
83 relevant flag is <option>-fno-implicit-prelude</option>. See
84 <xref linkend="options-language">.
92 <title>User-visible interpreter (GHCi) changes</title>
96 <para>GHCi now works on Windows.</para>
100 <para>Partial FFI support in GHCi. At the moment, foreign
101 import (static and dynamic) are supported on x86 and sparc
106 <para>New interpreter command <literal>:add</literal>, to add
107 modules to the current bunch. See
108 <xref linkend="ghci-commands">.</para>
112 <para>New interpreter command <literal>:info</literal>, to provide
113 information on values, types and classes, a la Hugs. See
114 <xref linkend="ghci-commands">.</para>
118 <para>Multiple target modules are supported. You may specify
119 multiple modules for the <literal>:add</literal> and
120 <literal>:load</literal> commands. From the command line, you
121 may specify multiple modules when starting GHCi and when
122 compiling in <option>––make</option> mode. See
123 <xref linkend="ghci-commands">.</para>
127 <para>New flags <option>-ignore-dot-ghci</option> and
128 <option>-read-dot-ghci</option>. See
129 <xref linkend="ghci-dot-files">.</para>
133 <para>When starting GHCi from the command line, you may now
135 <option>-L<replaceable>library-path</replaceable></option> and
136 <option>-l<replaceable>library-name</replaceable></option> to
137 specify libraries to be loaded into the interactive
138 session. See <xref linkend="ghci-invokation">.</para>
145 <title>User-visible library changes</title>
148 <para>The <literal>SocketPrim</literal> and
149 <literal>BSD</literal> modules in the <literal>net</literal>
150 package have been re-written to use the FFI, be more portable,
151 and be more thread-safe. There are minor user-visible
152 changes: the functions <function>writeSocket</function>,
153 <function>readSocket</function> and
154 <function>readSocketAll</function> have been removed (use
155 <function>socketToHandle</function> and
156 <literal>Handle</literal> operations instead).</para>
160 <para>New function: <function>Exception.throwDynTo</function>.
161 See <xref linkend="sec-Dynamic-Exceptions">.</para>
165 <para><literal>BlockedOnDeadMVar</literal> and
166 <literal>ThreadKilled</literal> exceptions no longer generate
167 any output by default for forked threads.</para>
171 <para><literal>Weak.addForeignFinalizer</literal> is
172 deprecated; use the <literal>ForeignPtr</literal> library
177 <para>The I/O library has been completely rewritten, using the
178 new FFI libraries and <command>hsc2hs</command>. The main
179 improvement is to the way streams are handled: simultaneous
180 read and write with multiple threads using a socket or FIFO is
181 now possible, whereas before it was necessary to use two
182 separate handles.</para>
186 <para>As a result of the I/O rewrite, the extensions
187 <literal>IOExts.hConnectTo</literal> and
188 <literal>IOExts.withHandleFor</literal> have been removed.
189 Also, <literal>hGetBuf</literal> and
190 <literal>hPutBuf</literal> have been removed, and
191 <literal>hGetBufFull</literal> and
192 <literal>hPutBufFull</literal> have been renamed to
193 <literal>hGetBuf</literal> and <literal>hPutBuf</literal>
194 respectively (similary for the <literal>BA</literal>
195 versions of these functions).</para>
199 <para><literal>System.exitWith</literal> now throws
200 <literal>ExitException</literal> rather than causing the
201 program to exit immediately. <literal>ExitException</literal>
202 is by default caught by the top level exception handler in the
203 main thread, where it causes the program to exit. Hence, calling
204 <literal>System.exitWith</literal> in GHCi no longer causes
205 GHCi itself to exit.</para>
209 <para>New function: <literal>MVar.addMVarFinalizer</literal>
210 (see <xref linkend="sec-MVars">).</para>
214 <para>New module <literal>SystemExts</literal> for useful
215 system-ish functionality (see <xref
216 linkend="sec-SystemExts">).</para>
220 <para><literal>SocketPrim</literal>: added instances of
221 <literal>Eq</literal> and <literal>Show</literal> for the
222 <literal>Socket</literal> type.</para>
226 <para>The implementation of
227 <literal>MarsalAlloc.allocaBytes</literal> now uses GHC's
228 internal allocator and is much faster than before. As a
229 result, the <literal>UnsafeCString</literal> type and
230 functions are no longer necessary and have been removed from
231 <literal>CString</literal>.</para>
237 <title>New experimental features</title>
240 <!-- don't forget: 31-bit support -->
243 <para>Partial support for hierarchical module names.</para>
247 <para>Mucho hacking on the .NET code generator, including
248 some FFI extensions for .NET interop. It's still
249 severely b0rk3d, so won't do anything useful. Yet.</para>
253 <para>Emission of external Core format. The goal is for
254 other tools to be able to grab the Core resulting from GHC's
255 front end manglings and optimisations. Core format is
256 formally defined by the document <ulink url="http://www.haskell.org/ghc/docs/papers/core.ps.gz"
257 <citetitle>An External Representation for the GHC Core Language</citetitle></ulink>.
259 tools for reading, writing and typechecking external Core,
260 available in the source distribution directory <literal>/fptools/ghc/utils/ext-core</literal>.
261 Ultimately we plan that Core files can also be read by
262 GHC. The relevant flag is <option>-fext-core</option>.
267 <para>A compacting garbage collector has been added. It isn't
268 on by default, because it is somewhat slower than the existing
269 copying collector, but can be automatically enabled when
270 memory gets tight by setting the maximum heap size (see <xref
271 linkend="rts-options-gc">). Compaction works together with
272 the existing generational scheme: it is only used on the
273 oldest generation. Despite the "experimental"
274 classification, we've jumped up and down quite significantly
275 on this code, and it seems stable.</para>
281 <title>Internal changes</title>
284 <para>The implementation of the <literal>Array</literal>,
285 <literal>IArray</literal> and <literal>MArray</literal>
286 libraries have been rewritten so that bulk operations like
287 <literal>listArray</literal> and <literal>elems</literal> do
288 less range checking and hence go faster.</para>
292 <para>The <literal>CPUTime</literal> library has been replaced
293 by one written using the FFI. No externally visible
298 <para>The compiler has a new strictness-and-absence analyser,
299 which is alleged to help it generate better code.</para>
308 ;;; Local Variables: ***
310 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***