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
218 these warnings (see <xref linkend="options-sanity" />).
224 The new flag <literal>-fwarn-dodgy-exports</literal> controls
225 whether an error is given for exporting a type synonym as
226 <literal>T(..)</literal>.
232 Name shadowing warnings are no longer given for variable names
233 beginning with an underscore.
239 When <literal>-Werror</literal> is given, we now pass
240 <literal>-Werror</literal> to <literal>cpp</literal>.
247 <title>Runtime system</title>
249 <para>The following options are all described in
250 <xref linkend="rts-options-gc" />.</para>
255 The flag <literal>+RTS -N</literal> now automatically
256 determines how many threads to use, based on the number
257 of CPUs in your machine.
263 The parallel GC now uses the same threads as the mutator,
264 with the consequence that you can no longer select a
265 different number of threads to use for GC.
266 The <option>-g<replaceable>n</replaceable></option> RTS
267 option has been removed, except that <option>-g1</option> is
268 still accepted for backwards compatibility.
273 <literal>+RTS -qg<replaceable>gen</replaceable></literal> sets
274 the minimum generation for which parallel garbage collection
275 is used. Defaults to 1. The flag <literal>-qg</literal> on
276 its own disables parallel GC.
282 The new flag <literal>+RTS -qb<replaceable>gen</replaceable></literal>
283 controls load balancing in the parallel GC.
289 The new flag <literal>+RTS -qa</literal>
290 uses the OS to set thread affinity (experimental).
296 If you link with the <literal>-eventlog</literal> flag, then
297 the new flag <literal>+RTS -l</literal> generates
298 <literal><replaceable>prog</replaceable>.eventlog</literal>
299 files, which tools such as ThreadScope can use to show the
300 behaviour of your program (see <xref linkend="rts-eventlog" />). The
301 <literal>+RTS -D><replaceable>x</replaceable></literal> output
302 is also sent to the eventlog file if this option is enabled.
303 The <literal>+RTS -v</literal> flag sends eventlog data to
310 There is a new statistic in the <literal>+RTS -s</literal> output:
313 SPARKS: 1430 (2 converted, 1427 pruned)
316 This tells you how many sparks (requests for parallel
317 execution, caused by calls to <literal>par</literal>) were
318 created, how many were actually evaluated in parallel
319 (converted), and how many were found to be already evaluated
320 and were thus discarded (pruned). Any unaccounted for sparks
321 are simply discarded at the end of evaluation.
328 <title>Build system</title>
332 We now require GHC >= 6.8 to build.
338 We now require that gcc is >= 3.0.
344 In order to generate the parsers, happy >= 1.16 is now
345 required. The parsers are pre-generated in the source tarball,
346 so most users will not need Happy.
352 It is now possible to build GHC with a simple, BSD-licensed
353 Haskell implementation of Integer, instead of the
354 implementation on top of GMP. To do so, set
355 <literal>INTEGER_LIBRARY</literal> to
356 <literal>integer-simple</literal> in
357 <literal>mk/build.mk</literal>.
363 The build system has been rewritten for the 6.12 series.
364 See <ulink url="http://hackage.haskell.org/trac/ghc/wiki/Building/Using">the building guide</ulink>
365 for more information.
371 The build system now uses variables like
372 <literal>bindir</literal> compatibly with the GNU standard.
379 <title>Compiler</title>
383 The "Interface file version" field of the
384 <literal>ghc --info</literal> output has been removed, as it
385 is no longer used by GHC.
391 There is a new "LibDir" field in the
392 <literal>ghc --info</literal> output.
398 A field <replaceable>f</replaceable> in the
399 <literal>ghc --info</literal> can now be printed with
400 <literal>ghc --print-<replaceable>f</replaceable></literal>, with letters lower-cased
401 and spaces replaced by dashes.
407 GHC now works (as a 32bit application) on OS X Snow Leopard.
413 The native code generator now works on Sparc Solaris.
419 Haddock interface files are now portable between different
426 The new linker flag <literal>-eventlog</literal> enables the
427 <literal>+RTS -l</literal> event logging features. The
428 <literal>-debug</literal> flag also enables them.
434 There is a new flag <literal>-feager-blackholing</literal>
435 which typically gives better performing code when running
436 with multiple threads.
437 See <xref linkend="parallel-compile-options" /> for more
444 There is a new flag <literal>-fbuilding-cabal-package</literal>
445 which signals to GHC that it is being run by a build system,
446 rather than invoked directly. This currently means that GHC
447 gives different error messages in certain situations.
453 The following flags were static, but are now dynamic:
454 <literal>-fext-core</literal>,
455 <literal>-fauto-sccs-on-all-toplevs</literal>,
456 <literal>-auto-all</literal>,
457 <literal>-no-auto-all</literal>,
458 <literal>-fauto-sccs-on-exported-toplevs</literal>,
459 <literal>-auto</literal>,
460 <literal>-no-auto</literal>,
461 <literal>-fauto-sccs-on-individual-cafs</literal>,
462 <literal>-caf-all</literal> and
463 <literal>-no-caf-all</literal>.
474 If the argument to <literal>:set prompt</literal> starts with
475 a double quote then it is read with Haskell String syntax,
479 Prelude> :set prompt "Loaded: %s\n> "
487 The arguments to <literal>:set set</literal>
488 and <literal>:set show</literal> can now be tab completed.
494 We inherit some benefits from an upgraded version of haskeline:
499 A multitude of new emacs and vi commands.
505 New preference 'historyDuplicates' to prevent storage
512 Support PageUp and PageDown keys.
521 <title>Template Haskell</title>
525 You can now omit the splice notation for top-level declaration
536 Splices are now nestable, e.g. you can say
537 <literal>f x = $(g $(h 'x))</literal>.
543 It is now possible to splice in types.
550 <title>Package Handling</title>
554 Shared libraries are now supported on x86 and x86_64 Linux.
555 To use shared libraries, use the <literal>-dynamic</literal>
557 See <xref linkend="using-shared-libs" /> for more information.
563 The new <literal>-fno-shared-implib</literal> flag can be used
564 to stop GHC generating the <literal>.lib</literal> import
565 library when making a dynamic library. This reduces the disk
566 space used when you do not need it.
572 Packages can now be identified by a "package ID", which is
573 based on a hash of the ABIs. The new flag
574 <literal>-package-id</literal> allows packages to be
575 selected by this identifier (see <xref linkend="package-ids"
576 />). Package IDs enable GHC to detect potential
577 incompatibilities between packages and broken dependencies
578 much more accurately than before.
584 The new flag <literal>--abi-hash</literal>, used thus:
587 ghc --abi-hash M1 M2 ...
590 prints the combined hash of all the modules listed. It is
591 used to make package IDs.
597 You can now give <literal>ghc-pkg</literal> a
598 <literal>-v0</literal> flag to make it be silent,
599 <literal>-v1</literal> for normal verbosity (the default),
600 or <literal>-v2</literal> or <literal>-v</literal> for
607 Rather than being a single <literal>package.conf</literal> file,
608 package databases now consist of a directory containing one
609 file per package, and a binary cache of the information.
610 GHC should be much faster to start up when the package
611 database grows large.
617 There is a new command <literal>ghc-pkg init</literal> to
618 create a package database.
624 There is a new command <literal>ghc-pkg dot</literal> to
625 generate a GraphViz graph of the dependencies between
632 There is a new command <literal>ghc-pkg recache</literal> to
633 update the package database cache should it become out of
634 date, or for registering packages manually.
641 <title>Libraries</title>
644 GHC no longer comes with any extralibs; instead, the
645 <ulink url="http://hackage.haskell.org/platformi/">Haskell Platform</ulink>
646 will provide a consistent set of additional libraries.
654 Version number 0.3.0.0 (was 0.2.0.0)
660 The <literal>Data.Array.Diff</literal> module has been moved
672 Version number 4.2.0.0 (was 4.1.0.0)
678 We also ship a base version 3.0.3.2 (was 3.0.3.1), so legacy
679 code should continue to work. This package is now deprecated,
680 and will be removed in a future version of GHC.
686 Handle IO now supports automatic character set encoding
687 and newline translation. For more information, see the
688 "Unicode encoding/decoding" and "Newline conversion" sections
689 in the <literal>System.IO</literal> haddock docs.
695 Lazy I/O now throws an exception if an error is
696 encountered, in a divergence from the Haskell 98 spec which
697 requires that errors are discarded (see Section 21.2.2 of
698 the Haskell 98 report). The exception thrown is the usual
699 IO exception that would be thrown if the failing IO
700 operation was performed in the IO monad, and can be caught
701 by <literal>System.IO.Error.catch</literal>
702 or <literal>Control.Exception.catch</literal>.
708 It is now possible to create your own handles.
709 For more information, see the
710 <literal>GHC.IO.Handle</literal> haddock docs.
716 <literal>System.IO</literal> now exports two new functions,
717 <literal>openTempFileWithDefaultPermissions</literal> and
718 <literal>openBinaryTempFileWithDefaultPermissions</literal>.
724 <literal>Data.Fixed</literal> now provides
725 <literal>Data</literal> and <literal>Typeable</literal>
726 instances for <literal>Fixed</literal>, and exports
727 a number of new types:
728 <literal>E0</literal>, <literal>Uni</literal>,
729 <literal>E1</literal>, <literal>Deci</literal>,
730 <literal>E2</literal>, <literal>Centi</literal>,
731 <literal>E3</literal>, <literal>Milli</literal>,
732 <literal>E9</literal> and <literal>Nano</literal>.
738 In <literal>Control.Exception</literal>,
739 <literal>BlockedOnDeadMVar</literal>
741 <literal>BlockedIndefinitelyOnMVar</literal>
742 and <literal>BlockedIndefinitely</literal>
744 <literal>BlockedIndefinitelyOnSTM</literal>.
750 The <literal>Control.OldException</literal> module has been
757 <literal>System.Posix.Internals.setNonBlockingFD</literal>
758 now takes an additional <literal>Bool</literal> argument, so
759 you can turn blocking back on again.
765 A new function <literal>eof</literal> has been added to
766 <literal>Text.ParserCombinators.ReadP</literal>.
772 The <literal>Foreign.C.Types.CLDouble</literal> type has
773 been removed. It was never correct, but just a duplicate of
774 <literal>Foreign.C.Types.CDouble</literal>.
780 In <literal>Data.Data</literal>, the
781 <literal>StringRep</literal> and
782 <literal>StringConstr</literal> constructors have been
783 removed. The <literal>CharRep</literal> and
784 <literal>CharConstr</literal> constructors should be used
791 In <literal>Data.Data</literal>,
792 <literal>mkIntConstr</literal> has been deprecated in favour
793 of the new <literal>mkIntegralConstr</literal>.
799 In <literal>Data.Data</literal>,
800 <literal>mkFloatConstr</literal> has been deprecated in
801 favour of the new <literal>mkRealConstr</literal>.
807 In <literal>Data.Data</literal>,
808 <literal>mkNorepType</literal> has been deprecated in
809 favour of the new <literal>mkNoRepType</literal>.
816 <title>bytestring</title>
820 Version number 0.9.1.5 (was 0.9.1.4)
831 Version number 1.8.0.0 (was 1.6.0.3)
837 Many API changes. See the Cabal docs for more information.
844 <title>containers</title>
848 Version number 0.3.0.0 (was 0.2.0.1)
854 <literal>mapAccumRWithKey</literal> has been added to
855 <literal>Data.IntMap</literal>.
861 A <literal>Traversable</literal> instance has been added to
862 <literal>Data.IntMap.IntMap</literal>.
868 The types of <literal>Data.IntMap.intersectionWith</literal>
869 and <literal>Data.IntMap.intersectionWithKey</literal> have
873 intersectionWith :: (a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
874 intersectionWithKey :: (Key -> a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
880 intersectionWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
881 intersectionWithKey :: (Key -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
887 The types of <literal>Data.IntMap.findMin</literal>
888 and <literal>Data.IntMap.findMax</literal> have
892 findMin :: IntMap a -> a
893 findMax :: IntMap a -> a
899 findMin :: IntMap a -> (Int,a)
900 findMax :: IntMap a -> (Int,a)
906 <literal>Data.Map</literal> now exports
907 <literal>mapAccumRWithKey</literal>,
908 <literal>foldrWithKey</literal>,
909 <literal>foldlWithKey</literal> and
910 <literal>toDescList</literal>.
916 <literal>Data.Sequence</literal> now exports
917 <literal>replicate</literal>,
918 <literal>replicateA</literal>,
919 <literal>replicateM</literal>,
920 <literal>iterateN</literal>,
921 <literal>unfoldr</literal>,
922 <literal>unfoldl</literal>,
923 <literal>scanl</literal>,
924 <literal>scanl1</literal>,
925 <literal>scanr</literal>,
926 <literal>scanr1</literal>,
927 <literal>tails</literal>,
928 <literal>inits</literal>,
929 <literal>takeWhileL</literal>,
930 <literal>takeWhileR</literal>,
931 <literal>dropWhileL</literal>,
932 <literal>dropWhileR</literal>,
933 <literal>spanl</literal>,
934 <literal>spanr</literal>,
935 <literal>breakl</literal>,
936 <literal>breakr</literal>,
937 <literal>partition</literal>,
938 <literal>filter</literal>,
939 <literal>sort</literal>,
940 <literal>sortBy</literal>,
941 <literal>unstableSort</literal>,
942 <literal>unstableSortBy</literal>,
943 <literal>elemIndexL</literal>,
944 <literal>elemIndicesL</literal>,
945 <literal>elemIndexR</literal>,
946 <literal>elemIndicesR</literal>,
947 <literal>findIndexL</literal>,
948 <literal>findIndicesL</literal>,
949 <literal>findIndexR</literal>,
950 <literal>findIndicesR</literal>,
951 <literal>foldlWithIndex</literal>,
952 <literal>foldrWithIndex</literal>,
953 <literal>mapWithIndex</literal>,
954 <literal>zip</literal>,
955 <literal>zipWith</literal>,
956 <literal>zip3</literal>,
957 <literal>zipWith3</literal>,
958 <literal>zip4</literal> and
959 <literal>zipWith4</literal>.
966 <title>directory</title>
970 Version number 1.0.1.0 (was 1.0.0.3)
976 A new function <literal>copyPermissions</literal> has been
977 added to <literal>System.Directory</literal>.
986 (dph-base, dph-par, dph-prim-interface, dph-prim-par,
987 dph-prim-seq, dph-seq)
992 All the dph packages are version 0.4.0.
999 <title>extensible-exceptions</title>
1003 Version number 0.1.1.1 (was 0.1.1.0)
1010 <title>filepath</title>
1014 Version number 1.1.0.3 (was 1.1.0.2)
1020 The list of characters that are invalid in filenames on
1021 Windows now includes <literal>\</literal> (backslash).
1028 <title>ghc-binary</title>
1032 This is an internal package, and should not be used.
1039 <title>ghc-prim</title>
1043 Version number 0.2.0.0 (was 0.1.0.0)
1050 <title>haskell98</title>
1054 Version number 1.0.1.1 (was 1.0.1.0)
1065 Version number 0.5.0.4 (was 0.5.0.3)
1072 <title>integer-gmp</title>
1076 Version number 0.2.0.0 (was called integer, version 0.1.0.1)
1083 <title>integer-simple</title>
1087 This is a new boot package, version 0.1.0.0.
1094 <title>old-locale</title>
1098 Version number 1.0.0.2 (was 1.0.0.1)
1104 Date and time in ISO8601 format are now separated by
1105 <literal>T</literal> rather than a space.
1112 <title>old-time</title>
1116 Version number 1.0.0.3 (was 1.0.0.2)
1123 <title>packedstring</title>
1127 This is no longer a boot package.
1134 <title>pretty</title>
1138 Version number 1.0.1.1 (was 1.0.1.0)
1145 <title>process</title>
1149 Version number 1.0.1.2 (was 1.0.1.1)
1156 <title>random</title>
1160 Version number 1.0.0.2 (was 1.0.0.1)
1171 Version number 0.1.0.2 (was 0.1.0.1)
1178 <title>template-haskell</title>
1182 Version number 2.4.0.0 (was 2.3.0.1)
1188 Support for <literal>inline</literal> and
1189 <literal>specialise</literal> pragmas has been added.
1195 Support for bang patterns has been added
1201 Support for kind annotations has been added
1207 Support for equality constraints has been added
1213 Support for type family declarations has been added
1224 This is a new boot package, version 1.1.4.
1235 Version number 2.4.0.0 (was 2.3.2.0)
1241 <literal>System.Posix.IO</literal> now exports
1242 <literal>fdReadBuf</literal> and
1243 <literal>fdWriteBuf</literal>.
1249 <literal>System.Posix.Process.executeFile</literal> now
1250 returns <literal>IO a</literal> instead of
1251 <literal>IO ()</literal>.
1258 <title>Win32</title>
1262 Version number 2.2.0.1 (was 2.2.0.0)
1268 <literal>System.Win32.File</literal> now exports
1269 <literal>WIN32_FIND_DATA</literal>,
1270 <literal>FindData</literal>,
1271 <literal>getFindDataFileName</literal>,
1272 <literal>findFirstFile</literal>,
1273 <literal>findNextFile</literal> and
1274 <literal>findClose</literal>.
1280 <literal>System.Win32.Info</literal> now exports
1281 <literal>getCurrentDirectory</literal>,
1282 <literal>getTemporaryDirectory</literal>,
1283 <literal>getFullPathName</literal> and
1284 <literal>searchPath</literal>.
1290 <literal>System.Win32.Types</literal> now exports
1291 <literal>HRESULT</literal>.
1297 There is a new module <literal>System.Win32.Shell</literal>.