1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-6-12-1">
3 <title>Release notes for version 6.12.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.10 branch.
12 <title>Language changes</title>
16 The new <literal>TupleSections</literal> language extension
17 enables tuple sections, such as <literal>(, True)</literal>.
18 See <xref linkend="tuple-sections" /> for more information.
24 The new <literal>MonoLocalBinds</literal> language extension
25 disables type variable generalisation for bindings in
26 <literal>let</literal> and <literal>where</literal> clauses.
32 The new <literal>DeriveFunctor</literal>,
33 <literal>DeriveFoldable</literal> and
34 <literal>DeriveTraversable</literal> language extensions
35 enable deriving for the respective type classes.
36 See <xref linkend="deriving-typeable" /> for more information.
42 The new <literal>NoNPlusKPatterns</literal> language extension
43 disables <literal>n+k</literal> patterns.
44 See <xref linkend="n-k-patterns" /> for more information.
50 Some improvements have been made to record puns:
55 <literal>C { A.a }</literal> now works, expanding to
56 <literal>C { A.a = a }</literal>.
62 <literal>-fwarn-unused-matches</literal> no longer
63 warns about bindings introduced by
64 <literal>f (C {..}) = x</literal>.
70 The <literal>RecordWildCards</literal> language
72 <literal>DisambiguateRecordFields</literal>.
84 MkT :: forall a. Eq a => { x,y :: !a } -> T a
87 are now only accepted if the extension
88 <literal>TypeOperators</literal> is on.
94 It is now possible to define GADT records with class
95 constraints. The syntax is:
99 MkT :: forall a. Eq a => { x,y :: !a } -> T a
105 You can now list multiple GADT constructors with the same type,
117 It is now possible to use GADT syntax for data families:
120 data instance T [a] where
124 and make data instances be GADTs:
127 data instance T [a] where
129 T2 :: a -> b -> T [(a,b)]
135 Record updates can now be used with datatypes containing
136 existential type variables, provided the fields being altered
137 do not mention the existential types.
143 The <literal>ImpredicativeTypes</literal> extension now imples
144 the <literal>RankNTypes</literal> extension.
150 The <literal>ImpredicativeTypes</literal> extension is no
151 longer enabled by <literal>-fglasgow-exts</literal>.
157 You can now give multi-line <literal>DEPRECATED</literal> and
158 <literal>WARNING</literal> pragmas:
161 {-# DEPRECATED defaultUserHooks
162 ["Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2"
163 , "compatibility in which case you must stick with defaultUserHooks"]
170 The <literal>-#include</literal> flag and
171 <literal>INCLUDE</literal> pragma are now deprecated and
172 ignored. Since version 6.10.1, GHC has generated its own C
173 prototypes for foreign calls, rather than relying on
174 prototypes from C header files.
180 The <literal>threadsafe</literal> foreign import safety level
181 is now deprecated; use <literal>safe</literal> instead.
187 There is a new FFI calling convention called
188 <literal>prim</literal>, which allows calling C-- functions
189 (see <xref linkend="ffi-prim" />).
190 Most users are not expected to need this.
197 <title>Warnings</title>
201 A warning is now emitted if an unlifted type is bound in a
202 lazy pattern (in <literal>let</literal> or
203 <literal>where</literal> clause, or in an irrefutable pattern)
204 unless it is inside a bang pattern.
205 This warning is controlled by the
206 <literal>-fwarn-lazy-unlifted-bindings</literal> flag.
207 In a future version of GHC this will be an error.
213 There are two new warnings if a monadic result of type other than
214 <literal>m ()</literal> is used in a <literal>do</literal>
215 block, but its result is not bound.
216 The flags <literal>-fwarn-unused-do-bind</literal>
217 and <literal>-fwarn-wrong-do-bind</literal> control
224 There is a new warning if a monadic result of type other than
225 <literal>m ()</literal> is not bound.
226 The flag <literal>-fwarn-unused-do-bind</literal> controls
233 The new flag <literal>-fwarn-dodgy-exports</literal> controls
234 whether an error is given for exporting a type synonym as
235 <literal>T(..)</literal>.
241 Name shadowing warnings are no longer given for variable names
242 beginning with an underscore.
248 When <literal>-Werror</literal> is given, we now pass
249 <literal>-Werror</literal> to <literal>cpp</literal>.
256 <title>Runtime system</title>
258 <para>The following options are all described in
259 <xref linkend="rts-options-gc" />.</para>
264 The flag <literal>+RTS -N</literal> now automatically
265 determines how many threads to use, based on the number
266 of CPUs in your machine.
272 The parallel GC now uses the same threads as the mutator,
273 with the consequence that you can no longer select a
274 different number of threads to use for GC.
275 The <option>-g<replaceable>n</replaceable></option> RTS
276 option has been removed, except that <option>-g1</option> is
277 still accepted for backwards compatibility.
282 <literal>+RTS -qg<replaceable>gen</replaceable></literal> sets
283 the minimum generation for which parallel garbage collection
284 is used. Defaults to 1. The flag <literal>-qg</literal> on
285 its own disables parallel GC.
291 The new flag <literal>+RTS -qb<replaceable>gen</replaceable></literal>
292 controls load balancing in the parallel GC.
298 The new flag <literal>+RTS -qa</literal>
299 uses the OS to set thread affinity (experimental).
305 If you link with the <literal>-eventlog</literal> flag, then
306 the new flag <literal>+RTS -l</literal> generates
307 <literal><replaceable>prog</replaceable>.eventlog</literal>
308 files, which tools such as ThreadScope can use to show the
309 behaviour of your program (see <xref linkend="rts-eventlog" />). The
310 <literal>+RTS -D><replaceable>x</replaceable></literal> output
311 is also sent to the eventlog file if this option is enabled.
312 The <literal>+RTS -v</literal> flag sends eventlog data to
319 There is a new statistic in the <literal>+RTS -s</literal> output:
322 SPARKS: 1430 (2 converted, 1427 pruned)
325 This tells you how many sparks (requests for parallel
326 execution, caused by calls to <literal>par</literal>) were
327 created, how many were actually evaluated in parallel
328 (converted), and how many were found to be already evaluated
329 and were thus discarded (pruned). Any unaccounted for sparks
330 are simply discarded at the end of evaluation.
337 <title>Build system</title>
341 We now require GHC >= 6.8 to build.
347 We now require that gcc is >= 3.0.
353 In order to generate the parsers, happy >= 1.16 is now
354 required. The parsers are pre-generated in the source tarball,
355 so most users will not need Happy.
361 It is now possible to build GHC with a simple, BSD-licensed
362 Haskell implementation of Integer, instead of the
363 implementation on top of GMP. To do so, set
364 <literal>INTEGER_LIBRARY</literal> to
365 <literal>integer-simple</literal> in
366 <literal>mk/build.mk</literal>.
372 The build system has been rewritten for the 6.12 series.
373 See <ulink url="http://hackage.haskell.org/trac/ghc/wiki/Building/Using">the building guide</ulink>
374 for more information.
380 The build system now uses variables like
381 <literal>bindir</literal> compatibly with the GNU standard.
388 <title>Compiler</title>
392 The "Interface file version" field of the
393 <literal>ghc --info</literal> output has been removed, as it
394 is no longer used by GHC.
400 There is a new "LibDir" field in the
401 <literal>ghc --info</literal> output.
407 A field <replaceable>f</replaceable> in the
408 <literal>ghc --info</literal> can now be printed with
409 <literal>ghc --print-<replaceable>f</replaceable></literal>, with letters lower-cased
410 and spaces replaced by dashes.
416 GHC now works (as a 32bit application) on OS X Snow Leopard.
422 The native code generator now works on Sparc Solaris.
428 Haddock interface files are now portable between different
435 The new linker flag <literal>-eventlog</literal> enables the
436 <literal>+RTS -l</literal> event logging features. The
437 <literal>-debug</literal> flag also enables them.
443 There is a new flag <literal>-feager-blackholing</literal>
444 which typically gives better performing code when running
445 with multiple threads.
446 See <xref linkend="parallel-compile-options" /> for more
453 There is a new flag <literal>-fbuilding-cabal-package</literal>
454 which signals to GHC that it is being run by a build system,
455 rather than invoked directly. This currently means that GHC
456 gives different error messages in certain situations.
462 The following flags were static, but are now dynamic:
463 <literal>-fext-core</literal>,
464 <literal>-fauto-sccs-on-all-toplevs</literal>,
465 <literal>-auto-all</literal>,
466 <literal>-no-auto-all</literal>,
467 <literal>-fauto-sccs-on-exported-toplevs</literal>,
468 <literal>-auto</literal>,
469 <literal>-no-auto</literal>,
470 <literal>-fauto-sccs-on-individual-cafs</literal>,
471 <literal>-caf-all</literal> and
472 <literal>-no-caf-all</literal>.
483 If the argument to <literal>:set prompt</literal> starts with
484 a double quote then it is read with Haskell String syntax,
488 Prelude> :set prompt "Loaded: %s\n> "
496 The arguments to <literal>:set set</literal>
497 and <literal>:set show</literal> can now be tab completed.
503 We inherit some benefits from an upgraded version of haskeline:
508 A multitude of new emacs and vi commands.
514 New preference 'historyDuplicates' to prevent storage
521 Support PageUp and PageDown keys.
527 Let ctrl-L (clear-screen) work during getInputChar.
536 <title>Template Haskell</title>
540 You can now omit the splice notation for top-level declaration
551 Splices are now nestable, e.g. you can say
552 <literal>f x = $(g $(h 'x))</literal>.
558 It is now possible to splice in types.
565 <title>Package Handling</title>
569 Shared libraries are now supported on x86 and x86_64 Linux.
570 To use shared libraries, use the <literal>-dynamic</literal>
572 See <xref linkend="using-shared-libs" /> for more information.
578 The new <literal>-fno-shared-implib</literal> flag can be used
579 to stop GHC generating the <literal>.lib</literal> import
580 library when making a dynamic library. This reduces the disk
581 space used when you do not need it.
587 Packages can now be identified by a "package ID", which is
588 based on a hash of the ABIs. The new flag
589 <literal>-package-id</literal> allows packages to be
590 selected by this identifier (see <xref linkend="package-ids"
591 />). Package IDs enable GHC to detect potential
592 incompatibilities between packages and broken dependencies
593 much more accurately than before.
599 The new flag <literal>--abi-hash</literal>, used thus:
602 ghc --abi-hash M1 M2 ...
605 prints the combined hash of all the modules listed. It is
606 used to make package IDs.
612 You can now give <literal>ghc-pkg</literal> a
613 <literal>-v0</literal> flag to make it be silent,
614 <literal>-v1</literal> for normal verbosity (the default),
615 or <literal>-v2</literal> or <literal>-v</literal> for
622 Rather than being a single <literal>package.conf</literal> file,
623 package databases now consist of a directory containing one
624 file per package, and a binary cache of the information.
625 GHC should be much faster to start up when the package
626 database grows large.
632 There is a new command <literal>ghc-pkg init</literal> to
633 create a package database.
639 There is a new command <literal>ghc-pkg dot</literal> to
640 generate a GraphViz graph of the dependencies between
647 There is a new command <literal>ghc-pkg recache</literal> to
648 update the package database cache should it become out of
649 date, or for registering packages manually.
656 <title>Libraries</title>
659 GHC no longer comes with any extralibs; instead, the
660 <ulink url="http://hackage.haskell.org/platformi/">Haskell Platform</ulink>
661 will provide a consistent set of additional libraries.
669 Version number 0.3.0.0 (was 0.2.0.0)
675 The <literal>Data.Array.Diff</literal> module has been moved
687 Version number 4.2.0.0 (was 4.1.0.0)
693 We also ship a base version 3.0.3.2 (was 3.0.3.1), so legacy
694 code should continue to work. This package is now deprecated,
695 and will be removed in a future version of GHC.
701 Handle IO now supports automatic character set encoding
702 and newline translation. For more information, see the
703 "Unicode encoding/decoding" and "Newline conversion" sections
704 in the <literal>System.IO</literal> haddock docs.
710 It is now possible to create your own handles.
711 For more information, see the
712 <literal>GHC.IO.Handle</literal> haddock docs.
718 <literal>System.IO</literal> now exports two new functions,
719 <literal>openTempFileWithDefaultPermissions</literal> and
720 <literal>openBinaryTempFileWithDefaultPermissions</literal>.
726 <literal>Data.Fixed</literal> now provides
727 <literal>Data</literal> and <literal>Typeable</literal>
728 instances for <literal>Fixed</literal>, and exports
729 a number of new types:
730 <literal>E0</literal>, <literal>Uni</literal>,
731 <literal>E1</literal>, <literal>Deci</literal>,
732 <literal>E2</literal>, <literal>Centi</literal>,
733 <literal>E3</literal>, <literal>Milli</literal>,
734 <literal>E9</literal> and <literal>Nano</literal>.
740 In <literal>Control.Exception</literal>,
741 <literal>BlockedOnDeadMVar</literal>
743 <literal>BlockedIndefinitelyOnMVar</literal>
744 and <literal>BlockedIndefinitely</literal>
746 <literal>BlockedIndefinitelyOnSTM</literal>.
752 The <literal>Control.OldException</literal> module has been
759 <literal>System.Posix.Internals.setNonBlockingFD</literal>
760 now takes an additional <literal>Bool</literal> argument, so
761 you can turn blocking back on again.
767 A new function <literal>eof</literal> has been added to
768 <literal>Text.ParserCombinators.ReadP</literal>.
774 The <literal>Foreign.C.Types.CLDouble</literal> type has
775 been removed. It was never correct, but just a duplicate of
776 <literal>Foreign.C.Types.CDouble</literal>.
782 In <literal>Data.Data</literal>, the
783 <literal>StringRep</literal> and
784 <literal>StringConstr</literal> constructors have been
785 removed. The <literal>CharRep</literal> and
786 <literal>CharConstr</literal> constructors should be used
793 In <literal>Data.Data</literal>,
794 <literal>mkIntConstr</literal> has been deprecated in favour
795 of the new <literal>mkIntegralConstr</literal>.
801 In <literal>Data.Data</literal>,
802 <literal>mkFloatConstr</literal> has been deprecated in
803 favour of the new <literal>mkRealConstr</literal>.
809 In <literal>Data.Data</literal>,
810 <literal>mkNorepType</literal> has been deprecated in
811 favour of the new <literal>mkNoRepType</literal>.
818 <title>bytestring</title>
822 Version number 0.9.1.5 (was 0.9.1.4)
833 Version number 1.8.0.0 (was 1.6.0.3)
839 Many API changes. See the Cabal docs for more information.
846 <title>containers</title>
850 Version number 0.3.0.0 (was 0.2.0.1)
856 <literal>mapAccumRWithKey</literal> has been added to
857 <literal>Data.IntMap</literal>.
863 A <literal>Traversable</literal> instance has been added to
864 <literal>Data.IntMap.IntMap</literal>.
870 The types of <literal>Data.IntMap.intersectionWith</literal>
871 and <literal>Data.IntMap.intersectionWithKey</literal> have
875 intersectionWith :: (a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
876 intersectionWithKey :: (Key -> a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
882 intersectionWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
883 intersectionWithKey :: (Key -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
889 The types of <literal>Data.IntMap.findMin</literal>
890 and <literal>Data.IntMap.findMax</literal> have
894 findMin :: IntMap a -> a
895 findMax :: IntMap a -> a
901 findMin :: IntMap a -> (Int,a)
902 findMax :: IntMap a -> (Int,a)
908 <literal>Data.Map</literal> now exports
909 <literal>mapAccumRWithKey</literal>,
910 <literal>foldrWithKey</literal>,
911 <literal>foldlWithKey</literal> and
912 <literal>toDescList</literal>.
918 <literal>Data.Sequence</literal> now exports
919 <literal>replicate</literal>,
920 <literal>replicateA</literal>,
921 <literal>replicateM</literal>,
922 <literal>iterateN</literal>,
923 <literal>unfoldr</literal>,
924 <literal>unfoldl</literal>,
925 <literal>scanl</literal>,
926 <literal>scanl1</literal>,
927 <literal>scanr</literal>,
928 <literal>scanr1</literal>,
929 <literal>tails</literal>,
930 <literal>inits</literal>,
931 <literal>takeWhileL</literal>,
932 <literal>takeWhileR</literal>,
933 <literal>dropWhileL</literal>,
934 <literal>dropWhileR</literal>,
935 <literal>spanl</literal>,
936 <literal>spanr</literal>,
937 <literal>breakl</literal>,
938 <literal>breakr</literal>,
939 <literal>partition</literal>,
940 <literal>filter</literal>,
941 <literal>sort</literal>,
942 <literal>sortBy</literal>,
943 <literal>unstableSort</literal>,
944 <literal>unstableSortBy</literal>,
945 <literal>elemIndexL</literal>,
946 <literal>elemIndicesL</literal>,
947 <literal>elemIndexR</literal>,
948 <literal>elemIndicesR</literal>,
949 <literal>findIndexL</literal>,
950 <literal>findIndicesL</literal>,
951 <literal>findIndexR</literal>,
952 <literal>findIndicesR</literal>,
953 <literal>foldlWithIndex</literal>,
954 <literal>foldrWithIndex</literal>,
955 <literal>mapWithIndex</literal>,
956 <literal>zip</literal>,
957 <literal>zipWith</literal>,
958 <literal>zip3</literal>,
959 <literal>zipWith3</literal>,
960 <literal>zip4</literal> and
961 <literal>zipWith4</literal>.
968 <title>directory</title>
972 Version number 1.0.1.0 (was 1.0.0.3)
978 A new function <literal>copyPermissions</literal> has been
979 added to <literal>System.Directory</literal>.
988 (dph-base, dph-par, dph-prim-interface, dph-prim-par,
989 dph-prim-seq, dph-seq)
994 All the dph packages are version 0.4.0.
1001 <title>extensible-exceptions</title>
1005 Version number 0.1.1.1 (was 0.1.1.0)
1012 <title>filepath</title>
1016 Version number 1.1.0.3 (was 1.1.0.2)
1022 The list of characters that are invalid in filenames on
1023 Windows now includes <literal>\</literal> (backslash).
1030 <title>ghc-binary</title>
1034 This is an internal package, and should not be used.
1041 <title>ghc-prim</title>
1045 Version number 0.2.0.0 (was 0.1.0.0)
1052 <title>haskell98</title>
1056 Version number 1.0.1.1 (was 1.0.1.0)
1067 Version number 0.5.0.4 (was 0.5.0.3)
1074 <title>integer-gmp</title>
1078 Version number 0.2.0.0 (was called integer, version 0.1.0.1)
1085 <title>integer-simple</title>
1089 This is a new boot package, version 0.1.0.0.
1096 <title>old-locale</title>
1100 Version number 1.0.0.2 (was 1.0.0.1)
1106 Date and time in ISO8601 format are now separated by
1107 <literal>T</literal> rather than a space.
1114 <title>old-time</title>
1118 Version number 1.0.0.3 (was 1.0.0.2)
1125 <title>packedstring</title>
1129 This is no longer a boot package.
1136 <title>pretty</title>
1140 Version number 1.0.1.1 (was 1.0.1.0)
1147 <title>process</title>
1151 Version number 1.0.1.2 (was 1.0.1.1)
1158 <title>random</title>
1162 Version number 1.0.0.2 (was 1.0.0.1)
1173 Version number 0.1.0.2 (was 0.1.0.1)
1180 <title>template-haskell</title>
1184 Version number 2.4.0.0 (was 2.3.0.1)
1190 Support for <literal>inline</literal> and
1191 <literal>specialise</literal> pragmas has been added.
1197 Support for bang patterns has been added
1203 Support for kind annotations has been added
1209 Support for equality constraints has been added
1215 Support for type family declarations has been added
1226 This is a new boot package, version 1.1.4.
1237 Version number 2.4.0.0 (was 2.3.2.0)
1243 <literal>System.Posix.IO</literal> now exports
1244 <literal>fdReadBuf</literal> and
1245 <literal>fdWriteBuf</literal>.
1251 <literal>System.Posix.Process.executeFile</literal> now
1252 returns <literal>IO a</literal> instead of
1253 <literal>IO ()</literal>.
1260 <title>Win32</title>
1264 Version number 2.2.0.1 (was 2.2.0.0)
1270 <literal>System.Win32.File</literal> now exports
1271 <literal>WIN32_FIND_DATA</literal>,
1272 <literal>FindData</literal>,
1273 <literal>getFindDataFileName</literal>,
1274 <literal>findFirstFile</literal>,
1275 <literal>findNextFile</literal> and
1276 <literal>findClose</literal>.
1282 <literal>System.Win32.Info</literal> now exports
1283 <literal>getCurrentDirectory</literal>,
1284 <literal>getTemporaryDirectory</literal>,
1285 <literal>getFullPathName</literal> and
1286 <literal>searchPath</literal>.
1292 <literal>System.Win32.Types</literal> now exports
1293 <literal>HRESULT</literal>.
1299 There is a new module <literal>System.Win32.Shell</literal>.