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.
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.
518 Let ctrl-L (clear-screen) work during getInputChar.
527 <title>Template Haskell</title>
531 You can now omit the splice notation for top-level declaration
542 Splices are now nestable, e.g. you can say
543 <literal>f x = $(g $(h 'x))</literal>.
549 It is now possible to splice in types.
556 <title>Package Handling</title>
560 Shared libraries are now supported on x86 and x86_64 Linux.
561 To use shared libraries, use the <literal>-dynamic</literal>
563 See <xref linkend="using-shared-libs" /> for more information.
569 The new <literal>-fno-shared-implib</literal> flag can be used
570 to stop GHC generating the <literal>.lib</literal> import
571 library when making a dynamic library. This reduces the disk
572 space used when you do not need it.
578 Packages can now be identified by a "package ID", which is
579 based on a hash of the ABIs. The new flag
580 <literal>-package-id</literal> allows packages to be selected
587 The new flag <literal>--abi-hash</literal>, used thus:
590 ghc --abi-hash M1 M2 ...
593 prints the combined hash of all the modules listed. It is
594 used to make package IDs.
600 You can now give <literal>ghc-pkg</literal> a
601 <literal>-v0</literal> flag to make it be silent,
602 <literal>-v1</literal> for normal verbosity (the default),
603 or <literal>-v2</literal> or <literal>-v</literal> for
610 Rather than being a single <literal>package.conf</literal> file,
611 package databases now consist of a directory containing one
612 file per package, and a binary cache of the information.
619 <title>Libraries</title>
622 GHC no longer comes with any extralibs; instead, the
623 <ulink url="http://hackage.haskell.org/platformi/">Haskell Platform</ulink>
624 will provide a consistent set of additional libraries.
632 Version number 0.3.0.0 (was 0.2.0.0)
638 The <literal>Data.Array.Diff</literal> module has been moved
650 Version number 4.2.0.0 (was 4.1.0.0)
656 We also ship a base version 3.0.3.2 (was 3.0.3.1), so legacy
657 code should continue to work. This package is now deprecated,
658 and will be removed in a future version of GHC.
664 Handle IO now supports automatic character set encoding
665 and newline translation. For more information, see the
666 "Unicode encoding/decoding" and "Newline conversion" sections
667 in the <literal>System.IO</literal> haddock docs.
673 It is now possible to create your own handles.
674 For more information, see the
675 <literal>GHC.IO.Handle</literal> haddock docs.
681 <literal>System.IO</literal> now exports two new functions,
682 <literal>openTempFileWithDefaultPermissions</literal> and
683 <literal>openBinaryTempFileWithDefaultPermissions</literal>.
689 <literal>Data.Fixed</literal> now provides
690 <literal>Data</literal> and <literal>Typeable</literal>
691 instances for <literal>Fixed</literal>, and exports
692 a number of new types:
693 <literal>E0</literal>, <literal>Uni</literal>,
694 <literal>E1</literal>, <literal>Deci</literal>,
695 <literal>E2</literal>, <literal>Centi</literal>,
696 <literal>E3</literal>, <literal>Milli</literal>,
697 <literal>E9</literal> and <literal>Nano</literal>.
703 In <literal>Control.Exception</literal>,
704 <literal>BlockedOnDeadMVar</literal>
706 <literal>BlockedIndefinitelyOnMVar</literal>
707 and <literal>BlockedIndefinitely</literal>
709 <literal>BlockedIndefinitelyOnSTM</literal>.
715 The <literal>Control.OldException</literal> module has been
722 <literal>System.Posix.Internals.setNonBlockingFD</literal>
723 now takes an additional <literal>Bool</literal> argument, so
724 you can turn blocking back on again.
730 A new function <literal>eof</literal> has been added to
731 <literal>Text.ParserCombinators.ReadP</literal>.
737 The <literal>Foreign.C.Types.CLDouble</literal> type has
738 been removed. It was never correct, but just a duplicate of
739 <literal>Foreign.C.Types.CDouble</literal>.
745 In <literal>Data.Data</literal>, the
746 <literal>StringRep</literal> and
747 <literal>StringConstr</literal> constructors have been
748 removed. The <literal>CharRep</literal> and
749 <literal>CharConstr</literal> constructors should be used
756 In <literal>Data.Data</literal>,
757 <literal>mkIntConstr</literal> has been deprecated in favour
758 of the new <literal>mkIntegralConstr</literal>.
764 In <literal>Data.Data</literal>,
765 <literal>mkFloatConstr</literal> has been deprecated in
766 favour of the new <literal>mkRealConstr</literal>.
772 In <literal>Data.Data</literal>,
773 <literal>mkNorepType</literal> has been deprecated in
774 favour of the new <literal>mkNoRepType</literal>.
781 <title>bytestring</title>
785 Version number 0.9.1.5 (was 0.9.1.4)
796 Version number 1.8.0.0 (was 1.6.0.3)
802 Many API changes. See the Cabal docs for more information.
809 <title>containers</title>
813 Version number 0.3.0.0 (was 0.2.0.1)
819 <literal>mapAccumRWithKey</literal> has been added to
820 <literal>Data.IntMap</literal>.
826 A <literal>Traversable</literal> instance has been added to
827 <literal>Data.IntMap.IntMap</literal>.
833 The types of <literal>Data.IntMap.intersectionWith</literal>
834 and <literal>Data.IntMap.intersectionWithKey</literal> have
838 intersectionWith :: (a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
839 intersectionWithKey :: (Key -> a -> b -> a) -> IntMap a -> IntMap b -> IntMap a
845 intersectionWith :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
846 intersectionWithKey :: (Key -> a -> b -> c) -> IntMap a -> IntMap b -> IntMap c
852 The types of <literal>Data.IntMap.findMin</literal>
853 and <literal>Data.IntMap.findMax</literal> have
857 findMin :: IntMap a -> a
858 findMax :: IntMap a -> a
864 findMin :: IntMap a -> (Int,a)
865 findMax :: IntMap a -> (Int,a)
871 <literal>Data.Map</literal> now exports
872 <literal>mapAccumRWithKey</literal>,
873 <literal>foldrWithKey</literal>,
874 <literal>foldlWithKey</literal> and
875 <literal>toDescList</literal>.
881 <literal>Data.Sequence</literal> now exports
882 <literal>replicate</literal>,
883 <literal>replicateA</literal>,
884 <literal>replicateM</literal>,
885 <literal>iterateN</literal>,
886 <literal>unfoldr</literal>,
887 <literal>unfoldl</literal>,
888 <literal>scanl</literal>,
889 <literal>scanl1</literal>,
890 <literal>scanr</literal>,
891 <literal>scanr1</literal>,
892 <literal>tails</literal>,
893 <literal>inits</literal>,
894 <literal>takeWhileL</literal>,
895 <literal>takeWhileR</literal>,
896 <literal>dropWhileL</literal>,
897 <literal>dropWhileR</literal>,
898 <literal>spanl</literal>,
899 <literal>spanr</literal>,
900 <literal>breakl</literal>,
901 <literal>breakr</literal>,
902 <literal>partition</literal>,
903 <literal>filter</literal>,
904 <literal>sort</literal>,
905 <literal>sortBy</literal>,
906 <literal>unstableSort</literal>,
907 <literal>unstableSortBy</literal>,
908 <literal>elemIndexL</literal>,
909 <literal>elemIndicesL</literal>,
910 <literal>elemIndexR</literal>,
911 <literal>elemIndicesR</literal>,
912 <literal>findIndexL</literal>,
913 <literal>findIndicesL</literal>,
914 <literal>findIndexR</literal>,
915 <literal>findIndicesR</literal>,
916 <literal>foldlWithIndex</literal>,
917 <literal>foldrWithIndex</literal>,
918 <literal>mapWithIndex</literal>,
919 <literal>zip</literal>,
920 <literal>zipWith</literal>,
921 <literal>zip3</literal>,
922 <literal>zipWith3</literal>,
923 <literal>zip4</literal> and
924 <literal>zipWith4</literal>.
931 <title>directory</title>
935 Version number 1.0.1.0 (was 1.0.0.3)
941 A new function <literal>copyPermissions</literal> has been
942 added to <literal>System.Directory</literal>.
951 (dph-base, dph-par, dph-prim-interface, dph-prim-par,
952 dph-prim-seq, dph-seq)
957 All the dph packages are version 0.4.0.
964 <title>extensible-exceptions</title>
968 Version number 0.1.1.1 (was 0.1.1.0)
975 <title>filepath</title>
979 Version number 1.1.0.3 (was 1.1.0.2)
985 The list of characters that are invalid in filenames on
986 Windows now includes <literal>\</literal> (backslash).
993 <title>ghc-binary</title>
997 This is an internal package, and should not be used.
1004 <title>ghc-prim</title>
1008 Version number 0.2.0.0 (was 0.1.0.0)
1015 <title>haskell98</title>
1019 Version number 1.0.1.1 (was 1.0.1.0)
1030 Version number 0.5.0.4 (was 0.5.0.3)
1037 <title>integer-gmp</title>
1041 Version number 0.2.0.0 (was called integer, version 0.1.0.1)
1048 <title>integer-simple</title>
1052 This is a new boot package, version 0.1.0.0.
1059 <title>old-locale</title>
1063 Version number 1.0.0.2 (was 1.0.0.1)
1069 Date and time in ISO8601 format are now separated by
1070 <literal>T</literal> rather than a space.
1077 <title>old-time</title>
1081 Version number 1.0.0.3 (was 1.0.0.2)
1088 <title>packedstring</title>
1092 This is no longer a boot package.
1099 <title>pretty</title>
1103 Version number 1.0.1.1 (was 1.0.1.0)
1110 <title>process</title>
1114 Version number 1.0.1.2 (was 1.0.1.1)
1121 <title>random</title>
1125 Version number 1.0.0.2 (was 1.0.0.1)
1136 Version number 0.1.0.2 (was 0.1.0.1)
1143 <title>template-haskell</title>
1147 Version number 2.4.0.0 (was 2.3.0.1)
1153 Support for <literal>inline</literal> and
1154 <literal>specialise</literal> pragmas has been added.
1160 Support for bang patterns has been added
1166 Support for kind annotations has been added
1172 Support for equality constraints has been added
1178 Support for type family declarations has been added
1189 This is a new boot package, version 1.1.4.
1200 Version number 2.4.0.0 (was 2.3.2.0)
1206 <literal>System.Posix.IO</literal> now exports
1207 <literal>fdReadBuf</literal> and
1208 <literal>fdWriteBuf</literal>.
1214 <literal>System.Posix.Process.executeFile</literal> now
1215 returns <literal>IO a</literal> instead of
1216 <literal>IO ()</literal>.
1223 <title>Win32</title>
1227 Version number 2.2.0.1 (was 2.2.0.0)
1233 <literal>System.Win32.File</literal> now exports
1234 <literal>WIN32_FIND_DATA</literal>,
1235 <literal>FindData</literal>,
1236 <literal>getFindDataFileName</literal>,
1237 <literal>findFirstFile</literal>,
1238 <literal>findNextFile</literal> and
1239 <literal>findClose</literal>.
1245 <literal>System.Win32.Info</literal> now exports
1246 <literal>getCurrentDirectory</literal>,
1247 <literal>getTemporaryDirectory</literal>,
1248 <literal>getFullPathName</literal> and
1249 <literal>searchPath</literal>.
1255 <literal>System.Win32.Types</literal> now exports
1256 <literal>HRESULT</literal>.
1262 There is a new module <literal>System.Win32.Shell</literal>.