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>.</para>
57 -i<replaceable>seconds</replaceable></option> flag reinstated
58 for heap profiling.</para>
62 <para><option>-funbox-strict-fields</option> now works
68 Many bug fixes related to implicit-parameter support.</para>
73 Data declarations with no constructors are allowed.</para>
80 <title>User-visible interpreter (GHCi) changes</title>
84 <para>GHCi now works on Windows.</para>
88 <para>Partial FFI support in GHCi. At the moment, foreign
89 import (static and dynamic) are supported on x86 and sparc
94 <para>New interpreter command <literal>:add</literal>, to add
95 modules to the current bunch.</para>
99 <para>New interpreter command <literal>:info</literal>, to provide
100 information on values, types and classes, a la Hugs.</para>
104 <para>Multiple target modules are supported. You may specify
105 multiple modules for the <literal>:add</literal> and
106 <literal>:load</literal> commands. From the command line, you
107 may specify multiple modules when starting GHCi and when
108 compiling in <option>--make</option> mode.</para>
112 <para>New flags <option>-ignore-dot-ghci</option> and
113 <option>-read-dot-ghci</option>.</para>
117 <para>When starting GHCi from the command line, you may now
119 <option>-L<replaceable>library-path</replaceable></option> and
120 <option>-l<replaceable>library-name</replaceable></option> to
121 specify libraries to be loaded into the interactive
129 <title>User-visible library changes</title>
132 <para>The <literal>SocketPrim</literal> and
133 <literal>BSD</literal> modules in the <literal>net</literal>
134 package have been re-written to use the FFI, be more portable,
135 and be more thread-safe. There are minor user-visible
136 changes: the functions <function>writeSocket</function>,
137 <function>readSocket</function> and
138 <function>readSocketAll</function> have been removed (use
139 <function>socketToHandle</function> and
140 <literal>Handle</literal> operations instead).</para>
144 <para>New function: <function>Exception.throwDynTo</function>.
145 See <xref linkend="sec-Dynamic-Exceptions">.</para>
149 <para><literal>BlockedOnDeadMVar</literal> and
150 <literal>ThreadKilled</literal> exceptions no longer generate
151 any output by default for forked threads.</para>
155 <para><literal>Weak.addForeignFinalizer</literal> is
156 deprecated; use the <literal>ForeignPtr</literal> library
161 <para>The I/O library has been completely rewritten, using the
162 new FFI libraries and <command>hsc2hs</command>. The main
163 improvement is to the way streams are handled: simultaneous
164 read and write with multiple threads using a socket or FIFO is
165 now possible, whereas before it was necessary to use two
166 separate handles.</para>
170 <para>As a result of the I/O rewrite, the extensions
171 <literal>IOExts.hConnectTo</literal> and
172 <literal>IOExts.withHandleFor</literal> have been removed.
173 Also, <literal>hGetBuf</literal> and
174 <literal>hPutBuf</literal> have been removed, and
175 <literal>hGetBufFull</literal> and
176 <literal>hPutBufFull</literal> have been renamed to
177 <literal>hGetBuf</literal> and <literal>hPutBuf</literal>
178 respectively (similary for the <literal>BA</literal>
179 versions of these functions).</para>
183 <para><literal>System.exitWith</literal> now throws
184 <literal>ExitException</literal> rather than causing the
185 program to exit immediately. <literal>ExitException</literal>
186 is by default caught by the top level exception handler in the
187 main thread, where it causes the program to exit. Hence, calling
188 <literal>System.exitWith</literal> in GHCi no longer causes
189 GHCi itself to exit.</para>
193 <para>New function: <literal>MVar.addMVarFinalizer</literal>
194 (see <xref linkend="sec-MVars">).</para>
198 <para>New module <literal>SystemExts</literal> for useful
199 system-ish functionality (see <xref
200 linkend="sec-SystemExts">).</para>
204 <para><literal>SocketPrim</literal>: added instances of
205 <literal>Eq</literal> and <literal>Show</literal> for the
206 <literal>Socket</literal> type.</para>
210 <para>The implementation of
211 <literal>MarsalAlloc.allocaBytes</literal> now uses GHC's
212 internal allocator and is much faster than before. As a
213 result, the <literal>UnsafeCString</literal> type and
214 functions are no longer necessary and have been removed from
215 <literal>CString</literal>.</para>
221 <title>New experimental features</title>
224 <!-- don't forget: 31-bit support -->
227 <para>Support for hierarchical module names.</para>
231 <para>.NET code generator.</para>
235 <para>Emission of external Core format.</para>
239 <para>Experimental FFI extensions.</para>
243 <para>A compacting garbage collector has been added. It isn't
244 on by default, because it is somewhat slower than the existing
245 copying collector, but can be automatically enabled when
246 memory gets tight by setting the maximum heap size (see <xref
247 linkend="rts-options-gc">). Compaction works together with
248 the existing generational scheme: it is only used on the
249 oldest generation.</para>
255 <title>Internal changes</title>
258 <para>The implementation of the <literal>Array</literal>,
259 <literal>IArray</literal> and <literal>MArray</literal>
260 libraries have been rewritten so that bulk operations like
261 <literal>listArray</literal> and <literal>elems</literal> do
262 less range checking and hence go faster.</para>
266 <para>The <literal>CPUTime</literal> library has been replaced
267 by one written using the FFI. No externally visible
272 <para>The compiler has a new strictness-and-absence analyser,
273 which is alleged to help it generate better code.</para>
277 <para>Improved temporary (<literal>alloca</literal>-style)
278 memory support in the RTS: pinned objects.</para>
287 ;;; Local Variables: ***
289 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***