[project @ 2002-01-04 10:18:58 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
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>.  See <xref
53         linkend="using-local-packages">.</para>
54       </listitem>
55
56       <listitem>
57         <para><option>+RTS
58           -i<replaceable>seconds</replaceable></option> flag reinstated for heap
59           profiling.  See <xref linkend="prof-rts-options">.</para>
60       </listitem>
61
62       <listitem>
63         <para><option>-funbox-strict-fields</option> now works
64         correctly.  See <xref linkend="options-f">.</para>
65       </listitem>
66
67       <listitem>
68         <para>
69         Many bug fixes related to implicit-parameter support.</para>
70       </listitem>
71
72       <listitem>
73         <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>
77       </listitem>
78
79       <listitem>
80         <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">.
85         </para>
86       </listitem>
87
88     </itemizedlist>
89   </sect2>
90
91   <sect2>
92     <title>User-visible interpreter (GHCi) changes</title>
93
94     <itemizedlist>
95       <listitem>
96          <para>GHCi now works on Windows.</para>
97       </listitem>
98
99       <listitem>
100         <para>Partial FFI support in GHCi.  At the moment, foreign
101         import (static and dynamic) are supported on x86 and sparc
102         platforms.</para>
103       </listitem>
104
105       <listitem>
106         <para>New interpreter command <literal>:add</literal>, to add
107         modules to the current bunch.  See
108         <xref linkend="ghci-commands">.</para>
109       </listitem>
110
111       <listitem>
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>
115       </listitem>
116
117       <listitem>
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>&ndash;&ndash;make</option> mode.  See
123         <xref linkend="ghci-commands">.</para>
124       </listitem>
125
126       <listitem>
127         <para>New flags <option>-ignore-dot-ghci</option> and
128         <option>-read-dot-ghci</option>.  See
129         <xref linkend="ghci-dot-files">.</para>
130       </listitem>
131
132       <listitem>
133         <para>When starting GHCi from the command line, you may now
134         use the flags
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>
139       </listitem>
140
141     </itemizedlist>
142   </sect2>
143
144   <sect2>
145     <title>User-visible library changes</title>
146     <itemizedlist>
147       <listitem>
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>
157       </listitem>
158
159       <listitem>
160         <para>New function: <function>Exception.throwDynTo</function>.
161         See <xref linkend="sec-Dynamic-Exceptions">.</para>
162       </listitem>
163
164       <listitem>
165         <para><literal>BlockedOnDeadMVar</literal> and
166         <literal>ThreadKilled</literal> exceptions no longer generate
167         any output by default for forked threads.</para>
168       </listitem>
169
170       <listitem>
171         <para><literal>Weak.addForeignFinalizer</literal> is
172         deprecated; use the <literal>ForeignPtr</literal> library
173         instead.</para>
174       </listitem>
175
176       <listitem>
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>
183       </listitem>
184
185       <listitem>
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>
196       </listitem>
197
198       <listitem>
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>
206       </listitem>
207
208       <listitem>
209         <para>New function: <literal>MVar.addMVarFinalizer</literal>
210         (see <xref linkend="sec-MVars">).</para>
211       </listitem>
212
213       <listitem>
214         <para>New module <literal>SystemExts</literal> for useful
215         system-ish functionality (see <xref
216         linkend="sec-SystemExts">).</para>
217       </listitem>
218
219       <listitem>
220         <para><literal>SocketPrim</literal>: added instances of
221         <literal>Eq</literal> and <literal>Show</literal> for the
222         <literal>Socket</literal> type.</para>
223       </listitem>
224
225       <listitem>
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>
232       </listitem>
233     </itemizedlist>
234   </sect2>
235
236   <sect2>
237     <title>New experimental features</title>
238
239     <itemizedlist>
240       <!-- don't forget: 31-bit support -->
241
242       <listitem>
243         <para>Partial support for hierarchical module names.</para>
244       </listitem>
245
246       <listitem>
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>
250       </listitem>
251
252       <listitem>
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>.
258          We also have sample
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>.
263          </para>
264       </listitem>
265
266       <listitem>
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>
276       </listitem>
277     </itemizedlist>
278   </sect2>
279
280   <sect2>
281     <title>Internal changes</title>
282     <itemizedlist>
283       <listitem>
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>
289       </listitem>
290
291       <listitem>
292         <para>The <literal>CPUTime</literal> library has been replaced
293         by one written using the FFI.  No externally visible
294         changes.</para>
295       </listitem>
296
297       <listitem>
298         <para>The compiler has a new strictness-and-absence analyser,
299         which is alleged to help it generate better code.</para>
300       </listitem>
301
302     </itemizedlist>
303   </sect2>
304
305 </sect1>
306
307 <!-- Emacs stuff:
308      ;;; Local Variables: ***
309      ;;; mode: sgml ***
310      ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***
311      ;;; End: ***
312  -->