1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-7-0-1">
3 <title>Release notes for version 7.0.1</title>
6 The significant changes to the various parts of the compiler are
7 listed in the following sections. There have also been numerous bug
8 fixes and performance improvements over the 6.12 branch.
12 <title>Highlights</title>
16 GHC now defaults to the Haskell 2010 language standard.
20 Libraries are not quite so straightforward. By default, GHC
21 provides access to the <literal>base</literal> package,
22 which includes the Haskell 2010 libraries, albeit with a few
23 minor differences. For those who want to write strictly
24 standards-conforming code we also provide
25 the <literal>haskell2010</literal> package which provides
26 the precise APIs specified by Haskell 2010, but because the
27 module names in this package overlap with those in
28 the <literal>base</literal> package it is not possible to
29 use both <literal>haskell2010</literal>
30 and <literal>base</literal> at the same time (this also
31 applies to the <literal>array</literal> package). Hence to use
32 the Haskell 2010 libraries you should hide
33 the <literal>base</literal> and <literal>array</literal>
34 packages, for example with GHCi:
36 $ ghci -package haskell2010 -hide-package base -hide-package array
38 If you are using Cabal it isn't necessary to
39 hide <literal>base</literal> and <literal>array</literal>
40 explicitly, just don't include them in your <literal>build-depends</literal>.
46 On POSIX platforms, there is a new I/O manager based on
47 epoll/kqueue/poll, which allows multithreaded I/O code to
48 scale to a much larger number (100k+) of threads.
54 GHC now includes an LLVM code generator. For certain code,
55 particularly arithmetic heavy code, using the LLVM code
56 generator can bring some nice performance improvements.
62 The inliner has been overhauled, which should in general
63 give better performance while reducing unnecessary code-size
70 Large parts of the runtime system have been overhauled, in
71 particular the machinery related to blocking and wakeup of
72 threads and exception throwing (<literal>throwTo</literal>).
73 Several instances of pathological performance have been
74 fixed, especially where large numbers of threads are
81 Due to changes in the runtime system, if you are
82 using <literal>Control.Parallel.Strategies</literal> from
83 the <literal>parallel</literal> package, please upgrade to
84 at least version 2 (preferably version 3). The
85 implementation of Strategies
86 in <literal>parallel-1.x</literal> will lose parallelism
93 The full Haskell <literal>import</literal> syntax can now been
94 used to bring modules into scope in GHCi, e.g.
97 Prelude> import Data.List as L
98 Prelude Data.List> L.length "foo"
105 GHC now comes with a more recent mingw bundled on Windows,
106 which includes a fix for windres on Windows 7.
113 <title>Language changes</title>
117 GHC now understands the <literal>Haskell98</literal> and
118 <literal>Haskell2010</literal> languages.
122 These get processed before the language extension pragmas,
123 and define the default sets of extensions that are enabled.
124 If neither is specified, then the default is
125 <literal>Haskell2010</literal> plus the
126 <literal>MonoPatBinds</literal> extension.
132 GHC now supports the <literal>DoAndIfThenElse</literal>
133 extension, which is part of the Haskell 2010 standard.
139 Datatype contexts, such as the <literal>Eq a</literal> in
142 data Eq a => Set a = NilSet | ConsSet a (Set a)
145 are now treated as an extension
146 <literal>DatatypeContexts</literal> (on by default) by GHC.
152 GHC's support for unicode source has been improved, including
153 removing support for U+22EF for the <literal>..</literal>
154 symbol. See <xref linkend="unicode-syntax" /> for more details.
160 Pragmas are now reread after preprocessing. In particular,
161 this means that if a pragma is used to turn CPP on, then other
162 pragmas can be put in CPP conditionals.
168 The <literal>TypeOperators</literal> extension now allows
169 instance heads to use infix syntax.
175 The <literal>PackageImports</literal> extension now understands
176 <literal>this</literal> to mean the current package.
182 The <literal>INLINE</literal> and <literal>NOINLINE</literal>
183 pragmas can now take a <literal>CONLIKE</literal> modifier,
184 which indicates that the right hand side is cheap to compute,
185 and can thus be duplicated more freely.
186 See <xref linkend="conlike" /> for more details.
192 A <literal>ForceSpecConstr</literal> annotation on a type, e.g.
196 {-# ANN type SPEC ForceSpecConstr #-}
199 can be used to force GHC to fully specialise argument of that
206 A <literal>NoSpecConstr</literal> annotation on a type, e.g.
210 {-# ANN type T NoSpecConstr #-}
213 can be used to prevent SpecConstr from specialising on
214 arguments of that type.
220 There is are two experimental new extensions
221 <literal>AlternativeLayoutRule</literal> and
222 <literal>AlternativeLayoutRuleTransitional</literal>,
223 which are for exploring alternative layout rules in Haskell'.
224 The details are subject to change, so we advise against using
225 them in real code for now.
231 The <literal>NewQualifiedOperators</literal> extension has
232 been deprecated, as it was rejected by the Haskell' committee.
239 <title>Warnings</title>
243 There is now a warning for missing import lists, controlled
244 by the new <literal>-fwarn-missing-import-lists</literal> flag.
250 GHC will now warn about <literal>SPECIALISE</literal> and
251 <literal>UNPACK</literal> pragmas that have no effect.
262 Shared libraries are once again supported on Windows.
268 Shared libraries are now supported on OS X, both on x86 and on
269 PowerPC. The new <literal>-dylib-install-name</literal> GHC
270 flag is used to set the location of the dynamic library.
271 See <xref linkend="finding-shared-libs" /> for more details.
278 <title>Runtime system</title>
283 For security reasons, by default, the only RTS flag that
284 programs accept is <literal>+RTS --info</literal>. If you want
285 the full range of RTS flags then you need to link with the new
286 <literal>-rtsopts</literal> flag. See
287 <xref linkend="options-linker" /> for more details.
293 The RTS now exports a function <literal>setKeepCAFs</literal>
294 which is important when loading Haskell DLLs dynamically, as
295 a DLL may refer to CAFs that hae already been GCed.
301 The garbage collector no longer allows you to specify a number
302 of steps; there are now always 2. The <literal>-T</literal>
303 RTS flag has thus been removed.
309 A new RTS flag <literal>-H</literal> causes the RTS to use a
310 larger nursery, but without exceeding the amount of memory
311 that the application is already using. It makes some programs
312 go slower, but others go faster.
318 GHC now returns memory to the OS, if memory usage peaks and
319 then drops again. This is mainly useful for long running
320 processes which normally use very little memory, but
321 occasionally need a lot of memory for a short period of time.
327 On OS X, eventLog events are now available as DTrace probes.
333 The PAPI support has been improved. The new RTS flag
334 <literal>-a#0x40000000</literal> can be used to tell the RTS
335 to collect the native PAPI event <literal>0x40000000</literal>.
342 <title>Compiler</title>
346 GHC now defaults to <literal>--make</literal> mode, i.e. GHC
347 will chase dependencies for you automatically by default.
353 GHC now includes an LLVM code generator.
356 This includes a number of new flags:
357 a flag to tell GHC to use LLVM, <literal>-fllvm</literal>;
358 a flag to dump the LLVM input ,<literal>-ddump-llvm</literal>;
359 flags to keep the LLVM intermediate files,
360 <literal>-keep-llvm-file</literal> and
361 <literal>-keep-llvm-files</literal>;
362 flags to set the location and options for the LLVM optimiser
364 <literal>-pgmlo</literal>,
365 <literal>-pgmlc</literal>,
366 <literal>-optlo</literal> and
367 <literal>-optlc</literal>.
368 The LLVM code generator requires LLVM version 2.7 or later on
375 It is now possible to use <literal>-fno-code</literal> with
376 <literal>--make</literal>.
382 The new flag <literal>-dsuppress-coercions</literal> controls
383 whether GHC prints coercions in core dumps.
389 The new flag <literal>-dsuppress-module-prefixes</literal>
390 controls whether GHC prints module qualification prefixes
397 The inliner has been overhauled. The most significant
398 user-visible change is that only saturated functions are
405 would only be inlined if <literal>(.)</literal> is applied to 3
409 (.) f g = \x -> f (g x)
412 will be inlined if only applied to 2 arguments.
418 The <literal>-finline-if-enough-args</literal> flag is no
425 Column numbers in warnings and error messages now start at 1,
426 as is more standard, rather than 0.
432 GHCi now understands most linker scripts. In particular, this
433 means that GHCi is able to load the C pthread library.
439 The <literal>ghc --info</literal> output has been updated:
443 location of the global package database, in the
444 <literal>Global Package DB</literal> field.
447 It now includes the build, host and target platforms, in the
448 <literal>Build platform</literal>,
449 <literal>Host platform</literal> and
450 <literal>Target platform</literal> fields.
453 It now includes a <literal>Have llvm code generator</literal>
457 The <literal>Win32 DLLs</literal> field has been removed.
463 The registerised via-C backend, and the
464 <literal>-fvia-C</literal> flag, have been deprecated. The poor
465 floating-point performance in the x86 native code generator
466 has now been fixed, so we don't believe there is still any
467 reason to use the via-C backend.
473 There is now a new flag <literal>--supported-extensions</literal>,
474 which currently behaves the same as
475 <literal>--supported-languages</literal>.
481 GHC progress output such as
484 [ 1 of 5] Compiling Foo ( Foo.hs, Foo.o )
487 is now sent to stdout rather than stderr.
493 The new flag <literal>-fexpose-all-unfoldings</literal>
494 makes GHC put unfoldings for <emphasis>everything</emphasis>
495 in the interface file.
501 There are two new flags, <literal>-fno-specialise</literal>
502 and <literal>-fno-float-in</literal>, for disabling the
503 specialise and float-in passes.
509 The new flag <literal>-fstrictness-before=<replaceable>n</replaceable></literal> tells
510 GHC to run an additional strictness analysis pass
511 before simplifier phase <replaceable>n</replaceable>.
518 <literal>-funfolding-dict-discount</literal>
519 for tweaking the optimiser's behaviour.
525 The <literal>-fspec-inline-join-points</literal> flag has been
532 The <literal>-dynload wrapper</literal> flag has been
544 GHCi now understands layout in multi-line commands, so
550 Prelude| y = 2 in x + y
559 <title>Template Haskell and Quasi-Quoters</title>
563 It is now possible to quasi-quote patterns with
564 <literal>[p| ... |]</literal>.
570 It is no longer to use a <literal>$</literal> before the
571 name of a quasi-quoter, e.g. one can now say
572 <literal>[expr| ... |]</literal> rather than
573 <literal>[$expr| ... |]</literal>.
579 It is now possible to use a quasi-quoter for types, e.g.
580 <literal>f :: [$qq| ... |]</literal>
586 It is now possible to quasi-quote existentials and GADTs.
593 <title>GHC API</title>
597 There are now <literal>Data</literal> and
598 <literal>Typeable</literal> instances for the
605 As language extensions are not applied until after the base
606 language (Haskell98, Haskell2010 or the default) has been
607 selected, it is now necessary to tell the GHC API the point
608 at which the extension flags should be processed. Normally
609 this is done by calling
610 <literal>DynFlags.flattenExtensionFlags</literal> once all
611 the flags and pragmas have been read.
619 <title>Libraries</title>