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.
530 <title>Template Haskell</title>
534 You can now omit the splice notation for top-level declaration
545 Splices are now nestable, e.g. you can say
546 <literal>f x = $(g $(h 'x))</literal>.
552 It is now possible to splice in types.
559 <title>Package Handling</title>
563 Shared libraries are now supported on x86 and x86_64 Linux.
564 To use shared libraries, use the <literal>-dynamic</literal>
566 See <xref linkend="using-shared-libs" /> for more information.
572 The new <literal>-fno-shared-implib</literal> flag can be used
573 to stop GHC generating the <literal>.lib</literal> import
574 library when making a dynamic library. This reduces the disk
575 space used when you do not need it.
581 Packages can now be identified by a "package ID", which is
582 based on a hash of the ABIs. The new flag
583 <literal>-package-id</literal> allows packages to be
584 selected by this identifier (see <xref linkend="package-ids"
585 />). Package IDs enable GHC to detect potential
586 incompatibilities between packages and broken dependencies
587 much more accurately than before.
593 The new flag <literal>--abi-hash</literal>, used thus:
596 ghc --abi-hash M1 M2 ...
599 prints the combined hash of all the modules listed. It is
600 used to make package IDs.
606 You can now give <literal>ghc-pkg</literal> a
607 <literal>-v0</literal> flag to make it be silent,
608 <literal>-v1</literal> for normal verbosity (the default),
609 or <literal>-v2</literal> or <literal>-v</literal> for
616 Rather than being a single <literal>package.conf</literal> file,
617 package databases now consist of a directory containing one
618 file per package, and a binary cache of the information.
619 GHC should be much faster to start up when the package
620 database grows large.
626 There is a new command <literal>ghc-pkg init</literal> to
627 create a package database.
633 There is a new command <literal>ghc-pkg dot</literal> to
634 generate a GraphViz graph of the dependencies between
641 There is a new command <literal>ghc-pkg recache</literal> to
642 update the package database cache should it become out of
643 date, or for registering packages manually.
650 <title>Libraries</title>
653 GHC no longer comes with any extralibs; instead, the
654 <ulink url="http://hackage.haskell.org/platformi/">Haskell Platform</ulink>
655 will provide a consistent set of additional libraries.
663 Version number 0.3.0.0 (was 0.2.0.0)
669 The <literal>Data.Array.Diff</literal> module has been moved
681 Version number 4.2.0.0 (was 4.1.0.0)
687 We also ship a base version 3.0.3.2 (was 3.0.3.1), so legacy
688 code should continue to work. This package is now deprecated,
689 and will be removed in a future version of GHC.
695 Handle IO now supports automatic character set encoding
696 and newline translation. For more information, see the
697 "Unicode encoding/decoding" and "Newline conversion" sections
698 in the <literal>System.IO</literal> haddock docs.
704 It is now possible to create your own handles.
705 For more information, see the
706 <literal>GHC.IO.Handle</literal> haddock docs.
712 <literal>System.IO</literal> now exports two new functions,
713 <literal>openTempFileWithDefaultPermissions</literal> and
714 <literal>openBinaryTempFileWithDefaultPermissions</literal>.
720 <literal>Data.Fixed</literal> now provides
721 <literal>Data</literal> and <literal>Typeable</literal>
722 instances for <literal>Fixed</literal>, and exports
723 a number of new types:
724 <literal>E0</literal>, <literal>Uni</literal>,
725 <literal>E1</literal>, <literal>Deci</literal>,
726 <literal>E2</literal>, <literal>Centi</literal>,
727 <literal>E3</literal>, <literal>Milli</literal>,
728 <literal>E9</literal> and <literal>Nano</literal>.
734 In <literal>Control.Exception</literal>,
735 <literal>BlockedOnDeadMVar</literal>
737 <literal>BlockedIndefinitelyOnMVar</literal>
738 and <literal>BlockedIndefinitely</literal>
740 <literal>BlockedIndefinitelyOnSTM</literal>.
746 The <literal>Control.OldException</literal> module has been
753 <literal>System.Posix.Internals.setNonBlockingFD</literal>
754 now takes an additional <literal>Bool</literal> argument, so
755 you can turn blocking back on again.
761 A new function <literal>eof</literal> has been added to
762 <literal>Text.ParserCombinators.ReadP</literal>.
768 The <literal>Foreign.C.Types.CLDouble</literal> type has
769 been removed. It was never correct, but just a duplicate of
770 <literal>Foreign.C.Types.CDouble</literal>.
776 In <literal>Data.Data</literal>, the
777 <literal>StringRep</literal> and
778 <literal>StringConstr</literal> constructors have been
779 removed. The <literal>CharRep</literal> and
780 <literal>CharConstr</literal> constructors should be used
787 In <literal>Data.Data</literal>,
788 <literal>mkIntConstr</literal> has been deprecated in favour
789 of the new <literal>mkIntegralConstr</literal>.
795 In <literal>Data.Data</literal>,
796 <literal>mkFloatConstr</literal> has been deprecated in
797 favour of the new <literal>mkRealConstr</literal>.
803 In <literal>Data.Data</literal>,
804 <literal>mkNorepType</literal> has been deprecated in
805 favour of the new <literal>mkNoRepType</literal>.
812 <title>bytestring</title>
816 Version number 0.9.1.5 (was 0.9.1.4)
827 Version number 1.8.0.0 (was 1.6.0.3)
833 Many API changes. See the Cabal docs for more information.
840 <title>containers</title>
844 Version number 0.3.0.0 (was 0.2.0.1)
850 <literal>mapAccumRWithKey</literal> has been added to
851 <literal>Data.IntMap</literal>.
857 A <literal>Traversable</literal> instance has been added to
858 <literal>Data.IntMap.IntMap</literal>.
864 The types of <literal>Data.IntMap.intersectionWith</literal>
865 and <literal>Data.IntMap.intersectionWithKey</literal> have
869 intersectionWith :: (a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
870 intersectionWithKey :: (Key -> a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
876 intersectionWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
877 intersectionWithKey :: (Key -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
883 The types of <literal>Data.IntMap.findMin</literal>
884 and <literal>Data.IntMap.findMax</literal> have
888 findMin :: IntMap a -> a
889 findMax :: IntMap a -> a
895 findMin :: IntMap a -> (Int,a)
896 findMax :: IntMap a -> (Int,a)
902 <literal>Data.Map</literal> now exports
903 <literal>mapAccumRWithKey</literal>,
904 <literal>foldrWithKey</literal>,
905 <literal>foldlWithKey</literal> and
906 <literal>toDescList</literal>.
912 <literal>Data.Sequence</literal> now exports
913 <literal>replicate</literal>,
914 <literal>replicateA</literal>,
915 <literal>replicateM</literal>,
916 <literal>iterateN</literal>,
917 <literal>unfoldr</literal>,
918 <literal>unfoldl</literal>,
919 <literal>scanl</literal>,
920 <literal>scanl1</literal>,
921 <literal>scanr</literal>,
922 <literal>scanr1</literal>,
923 <literal>tails</literal>,
924 <literal>inits</literal>,
925 <literal>takeWhileL</literal>,
926 <literal>takeWhileR</literal>,
927 <literal>dropWhileL</literal>,
928 <literal>dropWhileR</literal>,
929 <literal>spanl</literal>,
930 <literal>spanr</literal>,
931 <literal>breakl</literal>,
932 <literal>breakr</literal>,
933 <literal>partition</literal>,
934 <literal>filter</literal>,
935 <literal>sort</literal>,
936 <literal>sortBy</literal>,
937 <literal>unstableSort</literal>,
938 <literal>unstableSortBy</literal>,
939 <literal>elemIndexL</literal>,
940 <literal>elemIndicesL</literal>,
941 <literal>elemIndexR</literal>,
942 <literal>elemIndicesR</literal>,
943 <literal>findIndexL</literal>,
944 <literal>findIndicesL</literal>,
945 <literal>findIndexR</literal>,
946 <literal>findIndicesR</literal>,
947 <literal>foldlWithIndex</literal>,
948 <literal>foldrWithIndex</literal>,
949 <literal>mapWithIndex</literal>,
950 <literal>zip</literal>,
951 <literal>zipWith</literal>,
952 <literal>zip3</literal>,
953 <literal>zipWith3</literal>,
954 <literal>zip4</literal> and
955 <literal>zipWith4</literal>.
962 <title>directory</title>
966 Version number 1.0.1.0 (was 1.0.0.3)
972 A new function <literal>copyPermissions</literal> has been
973 added to <literal>System.Directory</literal>.
982 (dph-base, dph-par, dph-prim-interface, dph-prim-par,
983 dph-prim-seq, dph-seq)
988 All the dph packages are version 0.4.0.
995 <title>extensible-exceptions</title>
999 Version number 0.1.1.1 (was 0.1.1.0)
1006 <title>filepath</title>
1010 Version number 1.1.0.3 (was 1.1.0.2)
1016 The list of characters that are invalid in filenames on
1017 Windows now includes <literal>\</literal> (backslash).
1024 <title>ghc-binary</title>
1028 This is an internal package, and should not be used.
1035 <title>ghc-prim</title>
1039 Version number 0.2.0.0 (was 0.1.0.0)
1046 <title>haskell98</title>
1050 Version number 1.0.1.1 (was 1.0.1.0)
1061 Version number 0.5.0.4 (was 0.5.0.3)
1068 <title>integer-gmp</title>
1072 Version number 0.2.0.0 (was called integer, version 0.1.0.1)
1079 <title>integer-simple</title>
1083 This is a new boot package, version 0.1.0.0.
1090 <title>old-locale</title>
1094 Version number 1.0.0.2 (was 1.0.0.1)
1100 Date and time in ISO8601 format are now separated by
1101 <literal>T</literal> rather than a space.
1108 <title>old-time</title>
1112 Version number 1.0.0.3 (was 1.0.0.2)
1119 <title>packedstring</title>
1123 This is no longer a boot package.
1130 <title>pretty</title>
1134 Version number 1.0.1.1 (was 1.0.1.0)
1141 <title>process</title>
1145 Version number 1.0.1.2 (was 1.0.1.1)
1152 <title>random</title>
1156 Version number 1.0.0.2 (was 1.0.0.1)
1167 Version number 0.1.0.2 (was 0.1.0.1)
1174 <title>template-haskell</title>
1178 Version number 2.4.0.0 (was 2.3.0.1)
1184 Support for <literal>inline</literal> and
1185 <literal>specialise</literal> pragmas has been added.
1191 Support for bang patterns has been added
1197 Support for kind annotations has been added
1203 Support for equality constraints has been added
1209 Support for type family declarations has been added
1220 This is a new boot package, version 1.1.4.
1231 Version number 2.4.0.0 (was 2.3.2.0)
1237 <literal>System.Posix.IO</literal> now exports
1238 <literal>fdReadBuf</literal> and
1239 <literal>fdWriteBuf</literal>.
1245 <literal>System.Posix.Process.executeFile</literal> now
1246 returns <literal>IO a</literal> instead of
1247 <literal>IO ()</literal>.
1254 <title>Win32</title>
1258 Version number 2.2.0.1 (was 2.2.0.0)
1264 <literal>System.Win32.File</literal> now exports
1265 <literal>WIN32_FIND_DATA</literal>,
1266 <literal>FindData</literal>,
1267 <literal>getFindDataFileName</literal>,
1268 <literal>findFirstFile</literal>,
1269 <literal>findNextFile</literal> and
1270 <literal>findClose</literal>.
1276 <literal>System.Win32.Info</literal> now exports
1277 <literal>getCurrentDirectory</literal>,
1278 <literal>getTemporaryDirectory</literal>,
1279 <literal>getFullPathName</literal> and
1280 <literal>searchPath</literal>.
1286 <literal>System.Win32.Types</literal> now exports
1287 <literal>HRESULT</literal>.
1293 There is a new module <literal>System.Win32.Shell</literal>.