[project @ 2001-08-24 09:33:14 by sewardj]
[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
9       <listitem>
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>
14       </listitem>
15
16       <listitem>
17         <para>Several small changes to bring GHC into line with the
18         newest Haskell&nbsp;98 report.</para>
19       </listitem>
20
21       <listitem>
22         <para>RTS options can now be specified using the environment
23         variable <envar>GHCRTS</envar>.</para>
24       </listitem>
25       
26       <listitem>
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>
32       </listitem>
33
34       <listitem>
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>
40       </listitem>
41
42       <listitem>
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>
46       </listitem>
47
48       <listitem>
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>
53       </listitem>
54
55       <listitem>
56         <para><option>+RTS
57         -i<replaceable>seconds</replaceable></option> flag reinstated
58         for heap profiling.</para>
59       </listitem>
60
61       <listitem>
62         <para><option>-funbox-strict-fields</option> now works
63         correctly.</para>
64       </listitem>
65
66       <listitem>
67         <para>
68         Many bug fixes related to implicit-parameter support.</para>
69       </listitem>
70
71       <listitem>
72         <para>
73         Data declarations with no constructors are allowed.</para>
74       </listitem>
75
76     </itemizedlist>
77   </sect2>
78
79   <sect2>
80     <title>User-visible interpreter (GHCi) changes</title>
81
82     <itemizedlist>
83       <listitem>
84          <para>GHCi now works on Windows.</para>
85       </listitem>
86
87       <listitem>
88         <para>Partial FFI support in GHCi.  At the moment, foreign
89         import (static and dynamic) are supported on x86 and sparc
90         platforms.</para>
91       </listitem>
92
93       <listitem>
94         <para>New interpreter command <literal>:add</literal>, to add
95         modules to the current bunch.</para>
96       </listitem>
97
98       <listitem>
99         <para>New interpreter command <literal>:info</literal>, to provide
100         information on values, types and classes, a la Hugs.</para>
101       </listitem>
102
103       <listitem>
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>
109       </listitem>
110
111       <listitem>
112         <para>New flags <option>-ignore-dot-ghci</option> and
113         <option>-read-dot-ghci</option>.</para>
114       </listitem>
115
116       <listitem>
117         <para>When starting GHCi from the command line, you may now
118         use the flags
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
122         session.</para>
123       </listitem>
124
125     </itemizedlist>
126   </sect2>
127
128   <sect2>
129     <title>User-visible library changes</title>
130     <itemizedlist>
131       <listitem>
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>
141       </listitem>
142
143       <listitem>
144         <para>New function: <function>Exception.throwDynTo</function>.
145         See <xref linkend="sec-Dynamic-Exceptions">.</para>
146       </listitem>
147
148       <listitem>
149         <para><literal>BlockedOnDeadMVar</literal> and
150         <literal>ThreadKilled</literal> exceptions no longer generate
151         any output by default for forked threads.</para>
152       </listitem>
153
154       <listitem>
155         <para><literal>Weak.addForeignFinalizer</literal> is
156         deprecated; use the <literal>ForeignPtr</literal> library
157         instead.</para>
158       </listitem>
159
160       <listitem>
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>
167       </listitem>
168
169       <listitem>
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>
180       </listitem>
181
182       <listitem>
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>
190       </listitem>
191
192       <listitem>
193         <para>New function: <literal>MVar.addMVarFinalizer</literal>
194         (see <xref linkend="sec-MVars">).</para>
195       </listitem>
196
197       <listitem>
198         <para>New module <literal>SystemExts</literal> for useful
199         system-ish functionality (see <xref
200         linkend="sec-SystemExts">).</para>
201       </listitem>
202
203       <listitem>
204         <para><literal>SocketPrim</literal>: added instances of
205         <literal>Eq</literal> and <literal>Show</literal> for the
206         <literal>Socket</literal> type.</para>
207       </listitem>
208
209       <listitem>
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>
216       </listitem>
217     </itemizedlist>
218   </sect2>
219
220   <sect2>
221     <title>New experimental features</title>
222
223     <itemizedlist>
224       <!-- don't forget: 31-bit support -->
225
226       <listitem>
227         <para>Support for hierarchical module names.</para>
228       </listitem>
229
230       <listitem>
231          <para>.NET code generator.</para>
232       </listitem>
233
234       <listitem>
235          <para>Emission of external Core format.</para>
236       </listitem>
237
238       <listitem>
239          <para>Experimental FFI extensions.</para>
240       </listitem>
241
242       <listitem>
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>
250       </listitem>
251     </itemizedlist>
252   </sect2>
253
254   <sect2>
255     <title>Internal changes</title>
256     <itemizedlist>
257       <listitem>
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>
263       </listitem>
264
265       <listitem>
266         <para>The <literal>CPUTime</literal> library has been replaced
267         by one written using the FFI.  No externally visible
268         changes.</para>
269       </listitem>
270
271       <listitem>
272         <para>The compiler has a new strictness-and-absence analyser,
273         which is alleged to help it generate better code.</para>
274       </listitem>
275
276       <listitem>
277         <para>Improved temporary (<literal>alloca</literal>-style)
278         memory support in the RTS: pinned objects.</para>
279       </listitem>
280
281     </itemizedlist>
282   </sect2>
283
284 </sect1>
285
286 <!-- Emacs stuff:
287      ;;; Local Variables: ***
288      ;;; mode: sgml ***
289      ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***
290      ;;; End: ***
291  -->