1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-6-14-1">
3 <title>Release notes for version 6.14.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 The inliner has been overhauled, which should in general
55 give better performance while reducing unnecessary code-size
62 Large parts of the runtime system have been overhauled, in
63 particular the machinery related to blocking and wakeup of
64 threads and exception throwing (<literal>throwTo</literal>).
65 Several instances of pathological performance have been
66 fixed, especially where large numbers of threads are
73 Due to changes in the runtime system, if you are
74 using <literal>Control.Parallel.Strategies</literal> from
75 the <literal>parallel</literal> package, please upgrade to
76 at least version 2 (preferably version 3). The
77 implementation of Strategies
78 in <literal>parallel-1.x</literal> will lose parallelism
85 The full Haskell <literal>import</literal> syntax can now been
86 used to bring modules into scope in GHCi, e.g.
89 Prelude> import Data.List as L
90 Prelude Data.List> L.length "foo"
98 <title>Language changes</title>
102 GHC now understands the <literal>Haskell98</literal> and
103 <literal>Haskell2010</literal> languages.
107 These get processed before the language extension pragmas,
108 and define the default sets of extensions that are enabled.
109 If neither is specified, then the default is
110 <literal>Haskell2010</literal> plus the
111 <literal>MonoPatBinds</literal> extension.
117 GHC now supports the <literal>DoAndIfThenElse</literal>
118 extension, which is part of the Haskell 2010 standard.
124 Datatype contexts, such as the <literal>Eq a</literal> in
127 data Eq a => Set a = NilSet | ConsSet a (Set a)
130 are now treated as an extension
131 <literal>DatatypeContexts</literal> (on by default) by GHC.
137 GHC's support for unicode source has been improved, including
138 removing support for U+22EF for the <literal>..</literal>
139 symbol. See <xref linkend="unicode-syntax" /> for more details.
145 Pragmas are now reread after preprocessing. In particular,
146 this means that if a pragma is used to turn CPP on, then other
147 pragmas can be put in CPP conditionals.
153 The <literal>TypeOperators</literal> extension now allows
154 instance heads to use infix syntax.
160 The <literal>PackageImports</literal> extension now understands
161 <literal>this</literal> to mean the current package.
167 The <literal>INLINE</literal> and <literal>NOINLINE</literal>
168 pragmas can now take a <literal>CONLIKE</literal> modifier,
169 which indicates that the right hand side is cheap to compute,
170 and can thus be duplicated more freely.
171 See <xref linkend="conlike" /> for more details.
177 A <literal>ForceSpecConstr</literal> annotation on a type, e.g.
181 {-# ANN type SPEC ForceSpecConstr #-}
184 can be used to force GHC to fully specialise argument of that
191 A <literal>NoSpecConstr</literal> annotation on a type, e.g.
195 {-# ANN type T NoSpecConstr #-}
198 can be used to prevent SpecConstr from specialising on
199 arguments of that type.
205 There is are two experimental new extensions
206 <literal>AlternativeLayoutRule</literal> and
207 <literal>AlternativeLayoutRuleTransitional</literal>,
208 which are for exploring alternative layout rules in Haskell'.
209 The details are subject to change, so we advise against using
210 them in real code for now.
216 The <literal>NewQualifiedOperators</literal> extension has
217 been deprecated, as it was rejected by the Haskell' committee.
224 <title>Warnings</title>
228 There is now a warning for missing import lists, controlled
229 by the new <literal>-fwarn-missing-import-lists</literal> flag.
235 GHC will now warn about <literal>SPECIALISE</literal> and
236 <literal>UNPACK</literal> pragmas that have no effect.
247 Shared libraries are once again supported on Windows.
253 Shared libraries are now supported on OS X, both on x86 and on
254 PowerPC. The new <literal>-dylib-install-name</literal> GHC
255 flag is used to set the location of the dynamic library.
256 See <xref linkend="finding-shared-libs" /> for more details.
263 <title>Runtime system</title>
268 For security reasons, by default, the only RTS flag that
269 programs accept is <literal>+RTS --info</literal>. If you want
270 the full range of RTS flags then you need to link with the new
271 <literal>-rtsopts</literal> flag. See
272 <xref linkend="options-linker" /> for more details.
278 The RTS now exports a function <literal>setKeepCAFs</literal>
279 which is important when loading Haskell DLLs dynamically, as
280 a DLL may refer to CAFs that hae already been GCed.
286 The garbage collector no longer allows you to specify a number
287 of steps; there are now always 2. The <literal>-T</literal>
288 RTS flag has thus been removed.
294 A new RTS flag <literal>-H</literal> causes the RTS to use a
295 larger nursery, but without exceeding the amount of memory
296 that the application is already using. It makes some programs
297 go slower, but others go faster.
303 GHC now returns memory to the OS, if memory usage peaks and
304 then drops again. This is mainly useful for long running
305 processes which normally use very little memory, but
306 occasionally need a lot of memory for a short period of time.
312 On OS X, eventLog events are now available as DTrace probes.
318 The PAPI support has been improved. The new RTS flag
319 <literal>-a#0x40000000</literal> can be used to tell the RTS
320 to collect the native PAPI event <literal>0x40000000</literal>.
327 <title>Compiler</title>
331 GHC now defaults to <literal>--make</literal> mode, i.e. GHC
332 will chase dependencies for you automatically by default.
338 GHC now includes an LLVM code generator.
341 This includes a number of new flags:
342 a flag to tell GHC to use LLVM, <literal>-fllvm</literal>;
343 a flag to dump the LLVM input ,<literal>-ddump-llvm</literal>;
344 flags to keep the LLVM intermediate files,
345 <literal>-keep-llvm-file</literal> and
346 <literal>-keep-llvm-files</literal>;
347 flags to set the location and options for the LLVM assembler,
348 optimiser and compiler,
349 <literal>-pgmla</literal>,
350 <literal>-pgmlo</literal>,
351 <literal>-pgmlc</literal>,
352 <literal>-optla</literal>,
353 <literal>-optlo</literal> and
354 <literal>-optlc</literal>.
360 It is now possible to use <literal>-fno-code</literal> with
361 <literal>--make</literal>.
367 The new flag <literal>-dsuppress-coercions</literal> controls
368 whether GHC prints coercions in core dumps.
374 The inliner has been overhauled. The most significant
375 user-visible change is that only saturated functions are
382 would only be inlined if <literal>(.)</literal> is applied to 3
386 (.) f g = \x -> f (g x)
389 will be inlined if only applied to 2 arguments.
395 The <literal>-finline-if-enough-args</literal> flag is no
402 Column numbers in warnings and error messages now start at 1,
403 as is more standard, rather than 0.
409 GHCi now understands most linker scripts. In particular, this
410 means that GHCi is able to load the C pthread library.
416 The <literal>ghc --info</literal> output has been updated:
420 location of the global package database, in the
421 <literal>Global Package DB</literal> field.
424 It now includes the build, host and target platforms, in the
425 <literal>Build platform</literal>,
426 <literal>Host platform</literal> and
427 <literal>Target platform</literal> fields.
430 It now includes a <literal>Have llvm code generator</literal>
434 The <literal>Win32 DLLs</literal> field has been removed.
440 The registerised via-C backend, and the
441 <literal>-fvia-C</literal> flag, have been deprecated. The poor
442 floating-point performance in the x86 native code generator
443 has now been fixed, so we don't believe there is still any
444 reason to use the via-C backend.
450 There is now a new flag <literal>--supported-extensions</literal>,
451 which currently behaves the same as
452 <literal>--supported-languages</literal>.
458 GHC progress output such as
461 [ 1 of 5] Compiling Foo ( Foo.hs, Foo.o )
464 is now sent to stdout rather than stderr.
470 The new flag <literal>-fexpose-all-unfoldings</literal>
471 makes GHC put unfoldings for <emphasis>everything</emphasis>
472 in the interface file.
478 There are two new flags, <literal>-fno-specialise</literal>
479 and <literal>-fno-float-in</literal>, for disabling the
480 specialise and float-in passes.
486 The new flag <literal>-fstrictness-before=<replaceable>n</replaceable></literal> tells
487 GHC to run an additional strictness analysis pass
488 before simplifier phase <replaceable>n</replaceable>.
495 <literal>-funfolding-dict-discount</literal>
496 for tweaking the optimiser's behaviour.
502 The <literal>-fspec-inline-join-points</literal> flag has been
514 GHCi now understands layout in multi-line commands, so
520 Prelude| y = 2 in x + y
529 <title>Template Haskell and Quasi-Quoters</title>
533 It is now possible to quasi-quote patterns with
534 <literal>[p| ... |]</literal>.
540 It is no longer to use a <literal>$</literal> before the
541 name of a quasi-quoter, e.g. one can now say
542 <literal>[expr| ... |]</literal> rather than
543 <literal>[$expr| ... |]</literal>.
549 It is now possible to use a quasi-quoter for types, e.g.
550 <literal>f :: [$qq| ... |]</literal>
556 It is now possible to quasi-quote existentials and GADTs.
563 <title>GHC API</title>
567 There are now <literal>Data</literal> and
568 <literal>Typeable</literal> instances for the
575 As language extensions are not applied until after the base
576 language (Haskell98, Haskell2010 or the default) has been
577 selected, it is now necessary to tell the GHC API the point
578 at which the extension flags should be processed. Normally
579 this is done by calling
580 <literal>DynFlags.flattenExtensionFlags</literal> once all
581 the flags and pragmas have been read.
589 <title>Libraries</title>