[project @ 2001-08-23 14:44:43 by simonmar]
[ghc-hetmet.git] / ghc / docs / users_guide / 5-02-notes.sgml
1 <sect1 id="release-5-02">
2   <title>Release notes for version 5.02</title>
3
4   <sect2>
5     <title>User-visible compiler changes</title>
6
7     <itemizedlist>
8       <listitem>
9         <para>Several small changes to bring GHC into line with the
10         newest Haskell&nbsp;98 report.</para>
11       </listitem>
12
13       <listitem>
14         <para>RTS options can now be specified using the environment
15         variable <envar>GHCRTS</envar>.</para>
16       </listitem>
17       
18       <listitem>
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>
24       </listitem>
25
26       <listitem>
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>
31       </listitem>
32
33       <listitem>
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>
37       </listitem>
38     </itemizedlist>
39   </sect2>
40
41   <sect2>
42     <title>New experimental features</title>
43
44     <itemizedlist>
45       <!-- don't forget: 31-bit support -->
46
47       <listitem>
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>
55       </listitem>
56     </itemizedlist>
57   </sect2>
58
59   <sect2>
60     <title>User-visible library changes</title>
61     <itemizedlist>
62       <listitem>
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>
72       </listitem>
73
74       <listitem>
75         <para>New function: <function>Exception.throwDynTo</function>.
76         See <xref linkend="sec-Dynamic-Exceptions">.</para>
77       </listitem>
78
79       <listitem>
80         <para><literal>BlockedOnDeadMVar</literal> and
81         <literal>ThreadKilled</literal> exceptions no longer generate
82         any output by default for forked threads.</para>
83       </listitem>
84
85       <listitem>
86         <para><literal>Weak.addForeignFinalizer</literal> is
87         deprecated; use the <literal>ForeignPtr</literal> library
88         instead.</para>
89       </listitem>
90
91       <listitem>
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>
98       </listitem>
99
100       <listitem>
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>
111       </listitem>
112
113       <listitem>
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>
121       </listitem>
122
123       <listitem>
124         <para>New function: <literal>MVar.addMVarFinalizer</literal>
125         (see <xref linkend="sec-MVars">).</para>
126       </listitem>
127
128       <listitem>
129         <para>New module <literal>SystemExts</literal> for useful
130         system-ish functionality (see <xref
131         linkend="sec-SystemExts">).</para>
132       </listitem>
133
134       <listitem>
135         <para><literal>SocketPrim</literal>: added instances of
136         <literal>Eq</literal> and <literal>Show</literal> for the
137         <literal>Socket</literal> type.</para>
138       </listitem>
139
140       <listitem>
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>
147       </listitem>
148     </itemizedlist>
149   </sect2>
150
151   <sect2>
152     <title>Internal changes</title>
153     <itemizedlist>
154       <listitem>
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>
160       </listitem>
161
162       <listitem>
163         <para>The <literal>CPUTime</literal> library has been replaced
164         by one written using the FFI.  No externally visible
165         changes.</para>
166       </listitem>
167     </itemizedlist>
168   </sect2>
169
170 </sect1>
171
172 <!-- Emacs stuff:
173      ;;; Local Variables: ***
174      ;;; mode: sgml ***
175      ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***
176      ;;; End: ***
177  -->