Release notes for version 5.04User-visible compiler changesFull support for MacOS X, including fully optimized compilation, has been added. Only a native
code generator and support for is still missing.
Everything else needs more testing, but should work.ghc-pkg: new options
,
/,
, and
/, and
suppport for expanding environment variables in package
descriptions. See ).The latest version of the FFI spec is fully supported.
The syntax of FFI declarations has changed accordingly. The
old syntax is still accepted for the time being, but will
elicit a warning from the compiler.New option: specifies a user-defined
preprocessing phase (see ).Major overhaul of the heap profiling subsystem, with new
facilities for retainer profiling and biographical profiling
(ala nhc98, albeit with a couple of omissions). The syntax of
the runtime heap-profiling options has changed. See .The type system now supports full rank-N types
(previously only limited rank-2 types were supported). See
.Explicit kind annotations can now be given on any
binding occurrence of a type variable. See .The handling of type synonyms has been rationalised.
See .Fixes for several space leaks in the compiler itself
(these fixes were also merged into 5.02.3).It is now possible to derive arbitrary classes for
newtypes. See .Deadlock is now an exception, rather than a return
status from the scheduler. See the module
Control.Exception in the library
documentation for more details.The syntax and behaviour of RULE
pragmas has changed slightly. See .Interface files are now in a binary format to reduce
compilation times. To view an interface file in plain text,
use the flag.A restriction on the form of class declarations has been
lifted. In Haskell 98, it is illegal for class method types
to mention constraints on the class type variable. eg.
class Seq s a where
elem :: Eq a => a -> s a -> Bool
This restriction has now been lifted in GHC.Main threads can now receive the
BlockedOnDeadMVar exception in the same way
as other threads.The flag never really
worked, and has been removed.The syntax of .hi-boot files is now
much clearer and Haskell-like. See .There is a new flag which enables
FFI support without turning on the rest of the GHC
extensions.The syntax for implicit parameter bindings has changed.
Previously the keyword with was used to
introduce implicit bindings, but now implicit bindings may be
introduced using let (see ). As a result of this,
with is no longer a keyword when
is turned on.The option -fwith may be used to
restore the old behaviour.Infix type constructors are now allowed, and must begin
with a colon (as with data constructors). See .The do-notation syntax is now
rebindable in the same way as other built-in syntax. See
.Support for using “frameworks” on
Darwin/MacOS X has been added. See the
option in , and the
framework_dirs field of a package spec in
.User-visible interpreter (GHCi) changesNew commands: :browse, :set
args, :set prog, :show
bindings, and :show modules (see
).There is a much more flexible mechanism for manipulating
the scope for expressions typed at the prompt. For example,
one can now have both the Prelude and the
exports of several compiled modules in scope at the same
time. See .GHCi now supports foreign import
"wrapper" FFI declarations.User-visible library changesGHC is in the process of moving to a new hierarchical
set of libraries. At the moment, we have two sets of
libraries, both described in accompanying documents:The “new libraries” which are
hierarchical and consist of the following packages:
base, haskell98,
haskell-src, and
network. Broadly speaking,
base contains the
Prelude, standard libraries and most of
the contents of the old lang
package. By default, the base and
haskell98 packages are enabled.The hslibs, most of which are now
deprecated. Where possible, new code should be written to
use the new libraries instead. The following libraries in hslibs
have not moved yet:The packages win32,
xlib, graphics,
and posix.The Edison libraries in the
data package.In the lang package, the
modules TimeExts,
DirectoryExts,
SystemExts, and
NumExts.The HaXml libraries in the
text package.In the util package, the
modules MD5,
Select, Memo,
Observe, and
Readline.All other libraries from hslibs
either have equivalents in the new libraries (see the
hslibs docs for details), or were
already deprecated and hence were not moved into the new
hierarchy.The Read class is now based on a
parsing combinator library which is vastly more efficient than
the previous one. See the modules
Text.Read.
Text.ParserCombinators.ReadP, and
Text.ParserCombinators.ReadPrec in the
library documentation.The code generated by the compiler for derived
Read instances should be much shorter than
before.New experimental featuresLinear implicit parameters. See .The RTS has support for running in a multi-threaded
environment and making non-blocking (from Haskell's point of
view) calls to foreign C functions which would normally block.
To enable this behaviour, configure with the
option.The compiler can now read in files containing Core
syntax (such as those produced by the
option) and compile them. Input
files with the .hcr file extension are
assumed to contain Core syntax.Internal changesHappy 1.13 is now required to build GHC, because of the
change in names of certain libraries.