Release notes for version 5.02User-visible compiler changesMajorly improved support for Windows platforms. Binary
builds are now entirely freestanding. There is no longer any
need to install Cygwin or Mingwin to use it. It's a
one-click-install-and-off-you-go story now.Several small changes to bring GHC into line with the
newest Haskell 98 report.RTS options can now be specified using the environment
variable GHCRTS.The maximum heap size, set with
+RTS -Msize,
now defaults to unlimited. We recommend however that you set
a maximum heap size appropriate for your machine using the
GHCRTS variable.Thanks to the heroic efforts of Ken Shan
ken@digitas.harvard.edu, GHC now works again on
the Alpha architecture (just Tru64 at the moment), and many
64-bit bugs have been shaken out. Interactive mode and the
native code generator do not currently work, sorry.New option: which causes GHC
to omit code generation and all future compilation stages (see
).New option . This makes GHC read
additional package descriptions from
file. See . flag reinstated for heap
profiling. See . now works
correctly. See .
Many bug fixes related to implicit-parameter support.
Data declarations with no constructors are allowed. This
facilitates types whose only value is bottom, and which have
no representation.
You can disconnect numeric syntax from the Prelude syntax.
Doing this means you can define your own arithmetic. The
relevant flag is . See
.
User-visible interpreter (GHCi) changesGHCi now works on Windows.Partial FFI support in GHCi. At the moment, foreign
import (static and dynamic) are supported on x86 and sparc
platforms.New interpreter command :add, to add
modules to the current bunch. See
.New interpreter command :info, to provide
information on values, types and classes, a la Hugs. See
.Multiple target modules are supported. You may specify
multiple modules for the :add and
:load commands. From the command line, you
may specify multiple modules when starting GHCi and when
compiling in mode. See
.New flags and
. See
.When starting GHCi from the command line, you may now
use the flags
and
to
specify libraries to be loaded into the interactive
session. See .User-visible library changesThe SocketPrim and
BSD modules in the net
package have been re-written to use the FFI, be more portable,
and be more thread-safe. There are minor user-visible
changes: the functions writeSocket,
readSocket and
readSocketAll have been removed (use
socketToHandle and
Handle operations instead).New function: Exception.throwDynTo.
See .BlockedOnDeadMVar and
ThreadKilled exceptions no longer generate
any output by default for forked threads.Weak.addForeignFinalizer is
deprecated; use the ForeignPtr library
instead.The I/O library has been completely rewritten, using the
new FFI libraries and hsc2hs. The main
improvement is to the way streams are handled: simultaneous
read and write with multiple threads using a socket or FIFO is
now possible, whereas before it was necessary to use two
separate handles.As a result of the I/O rewrite, the extensions
IOExts.hConnectTo and
IOExts.withHandleFor have been removed.
Also, hGetBuf and
hPutBuf have been removed, and
hGetBufFull and
hPutBufFull have been renamed to
hGetBuf and hPutBuf
respectively (similary for the BA
versions of these functions).System.exitWith now throws
ExitException rather than causing the
program to exit immediately. ExitException
is by default caught by the top level exception handler in the
main thread, where it causes the program to exit. Hence, calling
System.exitWith in GHCi no longer causes
GHCi itself to exit.New function: MVar.addMVarFinalizer
(see ).New module SystemExts for useful
system-ish functionality (see ).SocketPrim: added instances of
Eq and Show for the
Socket type.The implementation of
MarsalAlloc.allocaBytes now uses GHC's
internal allocator and is much faster than before. As a
result, the UnsafeCString type and
functions are no longer necessary and have been removed from
CString.New experimental featuresPartial support for hierarchical module names.Mucho hacking on the .NET code generator, including
some FFI extensions for .NET interop. It's still
severely b0rk3d, so won't do anything useful. Yet.Emission of external Core format. The goal is for
other tools to be able to grab the Core resulting from GHC's
front end manglings and optimisations. Core format is
formally defined by the document An External Representation for the GHC Core Language.
We also have sample
tools for reading, writing and typechecking external Core,
available in the source distribution directory /fptools/ghc/utils/ext-core.
Ultimately we plan that Core files can also be read by
GHC. The relevant flag is .
A compacting garbage collector has been added. It isn't
on by default, because it is somewhat slower than the existing
copying collector, but can be automatically enabled when
memory gets tight by setting the maximum heap size (see ). Compaction works together with
the existing generational scheme: it is only used on the
oldest generation. Despite the "experimental"
classification, we've jumped up and down quite significantly
on this code, and it seems stable.Internal changesThe implementation of the Array,
IArray and MArray
libraries have been rewritten so that bulk operations like
listArray and elems do
less range checking and hence go faster.The CPUTime library has been replaced
by one written using the FFI. No externally visible
changes.The compiler has a new strictness-and-absence analyser,
which is alleged to help it generate better code.