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. GHC now generates its own C prototypes, rather than
173 relying on C prototypes.
179 The <literal>threadsafe</literal> foreign import safety level
180 is now deprecated; use <literal>safe</literal> instead.
186 There is a new FFI calling convention called
187 <literal>prim</literal>, which allows calling C-- function.
188 Most users are not expected to need this.
195 <title>Warnings</title>
199 A warning is now emitted if an unlifted type is bound in a
200 lazy pattern (in <literal>let</literal> or
201 <literal>where</literal> clause, or in an irrefutable pattern)
202 unless it is inside a bang pattern.
203 This warning is controlled by the
204 <literal>-fwarn-lazy-unlifted-bindings</literal> flag.
205 In a future version of GHC this will be an error.
211 There are two new warnings if a monadic result of type other than
212 <literal>m ()</literal> is used in a <literal>do</literal>
213 block, but its result is not bound.
214 The flags <literal>-fwarn-unused-do-bind</literal>
215 and <literal>-fwarn-wrong-do-bind</literal> control
222 There is a new warning if a monadic result of type other than
223 <literal>m ()</literal> is not bound.
224 The flag <literal>-fwarn-unused-do-bind</literal> controls
231 The new flag <literal>-fwarn-dodgy-exports</literal> controls
232 whether an error is given for exporting a type synonym as
233 <literal>T(..)</literal>.
239 Name shadowing warnings are no longer given for variable names
240 beginning with an underscore.
246 When <literal>-Werror</literal> is given, we now pass
247 <literal>-Werror</literal> to <literal>cpp</literal>.
254 <title>Runtime system</title>
258 The flag <literal>+RTS -N</literal> now automatically
259 determines how many threads to use, based on the number
260 of CPUs in your machine.
266 The new flag <literal>+RTS -q1</literal> disables the parallel
274 <literal>+RTS -qg<replaceable>n</replaceable></literal>
275 sets the minimum generation for which parallel garbage
276 collection is used. Defaults to 1.
282 The new flag <literal>+RTS -qa</literal>
283 uses the OS to set thread affinity.
289 The new flag <literal>+RTS -qb</literal>
290 disables load balancing in the parallel garbage collector.
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. 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.
495 <title>Template Haskell</title>
499 You can now omit the splice notation for top-level declaration
510 Splices are now nestable, e.g. you can say
511 <literal>f x = $(g $(h 'x))</literal>.
517 It is now possible to splice in types.
524 <title>Package Handling</title>
528 Shared libraries are now supported on x86 and x86_64 Linux.
529 To use shared libraries, use the <literal>-dynamic</literal>
531 See <xref linkend="using-shared-libs" /> for more information.
537 The new <literal>-fno-shared-implib</literal> flag can be used
538 to stop GHC generating the <literal>.lib</literal> import
539 library when making a dynamic library. This reduces the disk
540 space used when you do not need it.
546 Packages can now be identified by a "package ID", which is
547 based on a hash of the ABIs. The new flag
548 <literal>-package-id</literal> allows packages to be selected
555 The new flag <literal>--abi-hash</literal>, used thus:
558 ghc --abi-hash M1 M2 ...
561 prints the combined hash of all the modules listed. It is
562 used to make package IDs.
568 You can now give <literal>ghc-pkg</literal> a
569 <literal>-v0</literal> flag to make it be silent,
570 <literal>-v1</literal> for normal verbosity (the default),
571 or <literal>-v2</literal> or <literal>-v</literal> for
578 Rather than being a single <literal>package.conf</literal> file,
579 package databases now consist of a directory containing one
580 file per package, and a binary cache of the information.
587 <title>Libraries</title>
590 GHC no longer comes with any extralibs; instead, the
591 <ulink url="http://hackage.haskell.org/platformi/">Haskell Platform</ulink>
592 will provide a consistent set of additional libraries.
600 Version number 0.3.0.0 (was 0.2.0.0)
606 The <literal>Data.Array.Diff</literal> module has been moved
618 Version number 4.2.0.0 (was 4.1.0.0)
624 We also ship a base version 3.0.3.2 (was 3.0.3.1), so legacy
625 code should continue to work. This package is now deprecated,
626 and will be removed in a future version of GHC.
632 Handle IO now supports automatic character set encoding
633 and newline translation. For more information, see the
634 "Unicode encoding/decoding" and "Newline conversion" sections
635 in the <literal>System.IO</literal> haddock docs.
641 It is now possible to create your own handles.
642 For more information, see the
643 <literal>GHC.IO.Handle</literal> haddock docs.
649 <literal>System.IO</literal> now exports two new functions,
650 <literal>openTempFileWithDefaultPermissions</literal> and
651 <literal>openBinaryTempFileWithDefaultPermissions</literal>.
657 <literal>Data.Fixed</literal> now provides
658 <literal>Data</literal> and <literal>Typeable</literal>
659 instances for <literal>Fixed</literal>, and exports
660 a number of new types:
661 <literal>E0</literal>, <literal>Uni</literal>,
662 <literal>E1</literal>, <literal>Deci</literal>,
663 <literal>E2</literal>, <literal>Centi</literal>,
664 <literal>E3</literal>, <literal>Milli</literal>,
665 <literal>E9</literal> and <literal>Nano</literal>.
671 In <literal>Control.Exception</literal>,
672 <literal>BlockedOnDeadMVar</literal>
674 <literal>BlockedIndefinitelyOnMVar</literal>
675 and <literal>BlockedIndefinitely</literal>
677 <literal>BlockedIndefinitelyOnSTM</literal>.
683 The <literal>Control.OldException</literal> module has been
690 <literal>System.Posix.Internals.setNonBlockingFD</literal>
691 now takes an additional <literal>Bool</literal> argument, so
692 you can turn blocking back on again.
698 A new function <literal>eof</literal> has been added to
699 <literal>Text.ParserCombinators.ReadP</literal>.
705 The <literal>Foreign.C.Types.CLDouble</literal> type has
706 been removed. It was never correct, but just a duplicate of
707 <literal>Foreign.C.Types.CDouble</literal>.
713 In <literal>Data.Data</literal>, the
714 <literal>StringRep</literal> and
715 <literal>StringConstr</literal> constructors have been
716 removed. The <literal>CharRep</literal> and
717 <literal>CharConstr</literal> constructors should be used
724 In <literal>Data.Data</literal>,
725 <literal>mkIntConstr</literal> has been deprecated in favour
726 of the new <literal>mkIntegralConstr</literal>.
732 In <literal>Data.Data</literal>,
733 <literal>mkFloatConstr</literal> has been deprecated in
734 favour of the new <literal>mkRealConstr</literal>.
740 In <literal>Data.Data</literal>,
741 <literal>mkNorepType</literal> has been deprecated in
742 favour of the new <literal>mkNoRepType</literal>.
749 <title>bytestring</title>
753 Version number 0.9.1.5 (was 0.9.1.4)
764 Version number 1.8.0.0 (was 1.6.0.3)
770 Many API changes. See the Cabal docs for more information.
777 <title>containers</title>
781 Version number 0.3.0.0 (was 0.2.0.1)
787 <literal>mapAccumRWithKey</literal> has been added to
788 <literal>Data.IntMap</literal>.
794 A <literal>Traversable</literal> instance has been added to
795 <literal>Data.IntMap.IntMap</literal>.
801 The types of <literal>Data.IntMap.intersectionWith</literal>
802 and <literal>Data.IntMap.intersectionWithKey</literal> have
806 intersectionWith :: (a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
807 intersectionWithKey :: (Key -> a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
813 intersectionWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
814 intersectionWithKey :: (Key -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
820 The types of <literal>Data.IntMap.findMin</literal>
821 and <literal>Data.IntMap.findMax</literal> have
825 findMin :: IntMap a -> a
826 findMax :: IntMap a -> a
832 findMin :: IntMap a -> (Int,a)
833 findMax :: IntMap a -> (Int,a)
839 <literal>Data.Map</literal> now exports
840 <literal>mapAccumRWithKey</literal>,
841 <literal>foldrWithKey</literal>,
842 <literal>foldlWithKey</literal> and
843 <literal>toDescList</literal>.
849 <literal>Data.Sequence</literal> now exports
850 <literal>replicate</literal>,
851 <literal>replicateA</literal>,
852 <literal>replicateM</literal>,
853 <literal>iterateN</literal>,
854 <literal>unfoldr</literal>,
855 <literal>unfoldl</literal>,
856 <literal>scanl</literal>,
857 <literal>scanl1</literal>,
858 <literal>scanr</literal>,
859 <literal>scanr1</literal>,
860 <literal>tails</literal>,
861 <literal>inits</literal>,
862 <literal>takeWhileL</literal>,
863 <literal>takeWhileR</literal>,
864 <literal>dropWhileL</literal>,
865 <literal>dropWhileR</literal>,
866 <literal>spanl</literal>,
867 <literal>spanr</literal>,
868 <literal>breakl</literal>,
869 <literal>breakr</literal>,
870 <literal>partition</literal>,
871 <literal>filter</literal>,
872 <literal>sort</literal>,
873 <literal>sortBy</literal>,
874 <literal>unstableSort</literal>,
875 <literal>unstableSortBy</literal>,
876 <literal>elemIndexL</literal>,
877 <literal>elemIndicesL</literal>,
878 <literal>elemIndexR</literal>,
879 <literal>elemIndicesR</literal>,
880 <literal>findIndexL</literal>,
881 <literal>findIndicesL</literal>,
882 <literal>findIndexR</literal>,
883 <literal>findIndicesR</literal>,
884 <literal>foldlWithIndex</literal>,
885 <literal>foldrWithIndex</literal>,
886 <literal>mapWithIndex</literal>,
887 <literal>zip</literal>,
888 <literal>zipWith</literal>,
889 <literal>zip3</literal>,
890 <literal>zipWith3</literal>,
891 <literal>zip4</literal> and
892 <literal>zipWith4</literal>.
899 <title>directory</title>
903 Version number 1.0.1.0 (was 1.0.0.3)
909 A new function <literal>copyPermissions</literal> has been
910 added to <literal>System.Directory</literal>.
919 (dph-base, dph-par, dph-prim-interface, dph-prim-par,
920 dph-prim-seq, dph-seq)
925 All the dph packages are version 0.4.0.
932 <title>extensible-exceptions</title>
936 Version number 0.1.1.1 (was 0.1.1.0)
943 <title>filepath</title>
947 Version number 1.1.0.3 (was 1.1.0.2)
953 The list of characters that are invalid in filenames on
954 Windows now includes <literal>\</literal> (backslash).
961 <title>ghc-binary</title>
965 This is an internal package, and should not be used.
972 <title>ghc-prim</title>
976 Version number 0.2.0.0 (was 0.1.0.0)
983 <title>haskell98</title>
987 Version number 1.0.1.1 (was 1.0.1.0)
998 Version number 0.5.0.4 (was 0.5.0.3)
1005 <title>integer-gmp</title>
1009 Version number 0.2.0.0 (was called integer, version 0.1.0.1)
1016 <title>integer-simple</title>
1020 This is a new boot package, version 0.1.0.0.
1027 <title>old-locale</title>
1031 Version number 1.0.0.2 (was 1.0.0.1)
1037 Date and time in ISO8601 format are now separated by
1038 <literal>T</literal> rather than a space.
1045 <title>old-time</title>
1049 Version number 1.0.0.3 (was 1.0.0.2)
1056 <title>packedstring</title>
1060 This is no longer a boot package.
1067 <title>pretty</title>
1071 Version number 1.0.1.1 (was 1.0.1.0)
1078 <title>process</title>
1082 Version number 1.0.1.2 (was 1.0.1.1)
1089 <title>random</title>
1093 Version number 1.0.0.2 (was 1.0.0.1)
1104 Version number 0.1.0.2 (was 0.1.0.1)
1111 <title>template-haskell</title>
1115 Version number 2.4.0.0 (was 2.3.0.1)
1121 Support for <literal>inline</literal> and
1122 <literal>specialise</literal> pragmas has been added.
1128 Support for bang patterns has been added
1134 Support for kind annotations has been added
1140 Support for equality constraints has been added
1146 Support for type family declarations has been added
1157 This is a new boot package, version 1.1.4.
1168 Version number 2.4.0.0 (was 2.3.2.0)
1174 <literal>System.Posix.IO</literal> now exports
1175 <literal>fdReadBuf</literal> and
1176 <literal>fdWriteBuf</literal>.
1182 <literal>System.Posix.Process.executeFile</literal> now
1183 returns <literal>IO a</literal> instead of
1184 <literal>IO ()</literal>.
1191 <title>Win32</title>
1195 Version number 2.2.0.1 (was 2.2.0.0)
1201 <literal>System.Win32.File</literal> now exports
1202 <literal>WIN32_FIND_DATA</literal>,
1203 <literal>FindData</literal>,
1204 <literal>getFindDataFileName</literal>,
1205 <literal>findFirstFile</literal>,
1206 <literal>findNextFile</literal> and
1207 <literal>findClose</literal>.
1213 <literal>System.Win32.Info</literal> now exports
1214 <literal>getCurrentDirectory</literal>,
1215 <literal>getTemporaryDirectory</literal>,
1216 <literal>getFullPathName</literal> and
1217 <literal>searchPath</literal>.
1223 <literal>System.Win32.Types</literal> now exports
1224 <literal>HRESULT</literal>.
1230 There is a new module <literal>System.Win32.Shell</literal>.