1 <sect1 id="release-5-02">
2 <title>Release notes for version 5.02</title>
5 <title>User-visible compiler changes</title>
9 <para>Several small changes to bring GHC into line with the
10 newest Haskell 98 report.</para>
14 <para>RTS options can now be specified using the environment
15 variable <envar>GHCRTS</envar>.</para>
19 <para>The maximum heap size, set with
20 <literal>+RTS -M<replaceable>size</replaceable></literal>,
21 now defaults to unlimited. We recommend however that you set
22 a maximum heap size appropriate for your machine using the
23 <envar>GHCRTS</envar> variable.</para>
27 <para>Thanks to the heroic efforts of Ken Shan
28 <email>ken@digitas.harvard.edu</email>, GHC now works again on
29 the Alpha architecture (just Tru64 at the moment), and many
30 (all?) of the 64-bit bugs have been shaken out.</para>
34 <para>New option: <option>-fno-code</option> which causes GHC
35 to omit code generation and all future compilation stages (see
36 <xref linkend="options-codegen">).</para>
42 <title>New experimental features</title>
45 <!-- don't forget: 31-bit support -->
48 <para>A compacting garbage collector has been added. It isn't
49 on by default, because it is somewhat slower than the existing
50 copying collector, but can be automatically enabled when
51 memory gets tight by setting the maximum heap size (see <xref
52 linkend="rts-options-gc">). Compaction works together with
53 the existing generational scheme: it is only used on the
54 oldest generation.</para>
60 <title>User-visible library changes</title>
63 <para>The <literal>SocketPrim</literal> and
64 <literal>BSD</literal> modules in the <literal>net</literal>
65 package have been re-written to use the FFI, be more portable,
66 and be more thread-safe. There are minor user-visible
67 changes: the functions <function>writeSocket</function>,
68 <function>readSocket</function> and
69 <function>readSocketAll</function> have been removed (use
70 <function>socketToHandle</function> and
71 <literal>Handle</literal> operations instead).</para>
75 <para>New function: <function>Exception.throwDynTo</function>.
76 See <xref linkend="sec-Dynamic-Exceptions">.</para>
80 <para><literal>BlockedOnDeadMVar</literal> and
81 <literal>ThreadKilled</literal> exceptions no longer generate
82 any output by default for forked threads.</para>
86 <para><literal>Weak.addForeignFinalizer</literal> is
87 deprecated; use the <literal>ForeignPtr</literal> library
92 <para>The I/O library has been completely rewritten, using the
93 new FFI libraries and <command>hsc2hs</command>. The main
94 improvement is to the way streams are handled: simultaneous
95 read and write with multiple threads using a socket or FIFO is
96 now possible, whereas before it was necessary to use two
97 separate handles.</para>
101 <para>As a result of the I/O rewrite, the extensions
102 <literal>IOExts.hConnectTo</literal> and
103 <literal>IOExts.withHandleFor</literal> have been removed.
104 Also, <literal>hGetBuf</literal> and
105 <literal>hPutBuf</literal> have been removed, and
106 <literal>hGetBufFull</literal> and
107 <literal>hPutBufFull</literal> have been renamed to
108 <literal>hGetBuf</literal> and <literal>hPutBuf</literal>
109 respectively (similary for the <literal>BA</literal>
110 versions of these functions).</para>
114 <para><literal>System.exitWith</literal> now throws
115 <literal>ExitException</literal> rather than causing the
116 program to exit immediately. <literal>ExitException</literal>
117 is by default caught by the top level exception handler in the
118 main thread, where it causes the program to exit. Hence, calling
119 <literal>System.exitWith</literal> in GHCi no longer causes
120 GHCi itself to exit.</para>
124 <para>New function: <literal>MVar.addMVarFinalizer</literal>
125 (see <xref linkend="sec-MVars">).</para>
129 <para>New module <literal>SystemExts</literal> for useful
130 system-ish functionality (see <xref
131 linkend="sec-SystemExts">).</para>
135 <para><literal>SocketPrim</literal>: added instances of
136 <literal>Eq</literal> and <literal>Show</literal> for the
137 <literal>Socket</literal> type.</para>
141 <para>The implementation of
142 <literal>MarsalAlloc.allocaBytes</literal> now uses GHC's
143 internal allocator and is much faster than before. As a
144 result, the <literal>UnsafeCString</literal> type and
145 functions are no longer necessary and have been removed from
146 <literal>CString</literal>.</para>
152 <title>Internal changes</title>
155 <para>The implementation of the <literal>Array</literal>,
156 <literal>IArray</literal> and <literal>MArray</literal>
157 libraries have been rewritten so that bulk operations like
158 <literal>listArray</literal> and <literal>elems</literal> do
159 less range checking and hence go faster.</para>
163 <para>The <literal>CPUTime</literal> library has been replaced
164 by one written using the FFI. No externally visible
173 ;;; Local Variables: ***
175 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***