1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-6-10-1">
3 <title>Release notes for version 6.10.1</title>
6 The significant changes to the various parts of the compiler are
7 listed in the following sections.
11 <title>User-visible compiler changes</title>
15 The new QuasiQuotes language extension adds
16 general quasi-quotation, as described in
17 "Nice to be Quoted: Quasiquoting for Haskell"
18 (Geoffrey Mainland, Haskell Workshop 2007).
19 See <xref linkend="th-quasiquotation" /> for more information.
24 The new ViewPatterns language extension allows
25 "view patterns". The syntax for view patterns
26 is <literal>expression -> pattern</literal> in a pattern.
27 For more information, see <xref linkend="view-patterns" />.
32 GHC already supported (e op) postfix operators, but this
33 support was enabled by default. Now you need to use the
34 PostfixOperators language extension if you want it.
35 See <xref linkend="postfix-operators" /> for more information
41 The new TransformListComp language extension enables
42 implements generalised list comprehensions, as described in
43 the paper "Comprehensive comprehensions" (Peyton Jones &
44 Wadler, Haskell Workshop 2007).
45 For more information see
46 <xref linkend="generalised-list-comprehensions" />.
51 If you want to use impredicative types then you now need to
52 enable the ImpredicativeTypes language extension.
53 See <xref linkend="impredicative-polymorphism" /> for more
59 FFI change: header files are now <emphasis>not
60 used</emphasis> when compiling via C.
61 The <option>-#include</option> flag,
62 the <literal>includes</literal> field
63 in <literal>.cabal</literal> files, and header files
64 specified in a <literal>foreign import</literal>
65 declaration all have no effect when compiling Haskell
68 <para>This change has important ramifications if you are
69 calling FFI functions that are defined by macros (or renamed
70 by macros). If you need to call one of these functions,
71 then write a C wrapper for the function and call the wrapper
72 using the FFI instead. In this way, your code will work
73 with GHC 6.10.1, and will also work
74 with <option>-fasm</option> in older GHCs.</para>
76 <para>This change was made for several reasons.
77 Firstly, <option>-fvia-C</option> now behaves consistently
78 with <option>-fasm</option>, which is important because we
79 intend to stop compiling via C in the future. Also, we
80 don't need to worry about the interactions between header
81 files, or CPP options necessary to expose certain functions
82 from the system header files (this was becoming quite a
83 headache). We don't need to worry about needing header
84 files when inlining FFI calls across module or package
85 boundaries; calls can now be inlined freely. One downside
86 is that you don't get a warning from the C compiler when you
87 call a function via the FFI at the wrong type.
90 <para>Another consequence of this change is that
91 calling <emphasis>varargs</emphasis> functions (such
92 as <literal>printf</literal>) via the FFI no longer works.
93 It has never been officially supported (the FFI spec outlaws
94 it), but in GHC 6.10.1 it may now really cause a crash on
95 certain platforms. Again, to call one of these functions
96 use appropriate fixed-argument C wrappers.</para>
100 There is a new languages extension PackageImports which allows
101 imports to be qualified with the package they should come
105 import "network" Network.Socket
108 Note that this feature is not intended for general use, it
109 was added for constructing backwards-compatibility packages
110 such as the <literal>base-3.0.3.0</literal> package. See
111 <xref linkend="package-imports" /> for more details.
116 In earlier versions of GHC, the recompilation checker didn't
117 notice changes in other packages meant that recompilation is
118 needed. This is now handled properly, using MD5 checksums of
124 GHC now treats the Unicode "Letter, Other" class as lowercase
125 letters. This is an arbitrary choice, but better than not
126 allowing them in identifiers at all. This may be revisited
132 In addition to the <literal>DEPRECATED</literal> pragma, you
133 can now attach arbitrary warnings to declarations with the new
134 <literal>WARNING</literal> pragma. See
135 <xref linkend="warning-deprecated-pragma" /> for more details.
140 If GHC is failing due to <literal>-Werror</literal>, then it
141 now emits a message telling you so.
146 GHC now warns about unrecognised pragmas, as they are often
147 caused by a typo. The
148 <literal>-fwarn-unrecognised-pragmas</literal> controls
149 whether this warning is emitted.
150 The warning is enabled by default.
156 <literal>-fwarn-dodgy-foreign-imports</literal> which controls
157 a new warning about FFI delcarations of the form
160 foreign import "f" f :: FunPtr t
163 on the grounds that it is probably meant to be
166 foreign import "&f" f :: FunPtr t
169 The warning is enabled by default.
174 External core (output only) is working again.
179 There is a new flag <literal>-dsuppress-uniques</literal> that
180 makes GHC's intermediate core easier to read. This flag cannot
181 be used when actually generating code.
186 There is a new flag <literal>-dno-debug-output</literal> that
187 suppresses all of the debug information when running a
188 compiler built with the <literal>DEBUG</literal> option.
193 A bug in earlier versions of GHC meant that sections didn't
194 always need to be parenthesised, e.g.
195 <literal>(+ 1, 2)</literal> was accepted. This has now been
201 The <literal>-fspec-threshold</literal> flag has been replaced
202 by <literal>-fspec-constr-threshold</literal> and
203 <literal>-fliberate-case-threshold</literal> flags.
204 The thresholds can be disabled by
205 <literal>-fno-spec-constr-threshold</literal> and
206 <literal>-fno-liberate-case-threshold</literal>.
211 The new flag <literal>-fsimplifier-phases</literal>
212 controls the number of simplifier phases run during
213 optimisation. These are numbered from n to 1 (by default, n=2).
214 Phase 0 is always run regardless of this flag.
219 Simplifier phases can have an arbitrary number of tags
220 assigned to them, and multiple phases can share the same tags.
221 The tags can be used as arguments to the new flag
222 <literal>-ddump-simpl-phases</literal>
223 to specify which phases are to be dumped.
228 <literal>-ddump-simpl-phases=main</literal> will dump the
229 output of phases 2, 1 and 0 of the initial simplifier run
230 (they all share the "main" tag) while
231 <literal>-ddump-simpl-phases=main:0</literal>
232 will dump only the output of phase 0 of that run.
236 At the moment, the supported tags are
237 main (the main, staged simplifier run (before strictness)),
238 post-worker-wrapper (after the w/w split),
239 post-liberate-case (after LiberateCase), and
240 final (final clean-up run)
244 The names are somewhat arbitrary and will change in the future.
249 The <literal>-fno-method-sharing</literal> flag is now
250 dynamic (it used to be static).
257 <title>Deprecated flags</title>
262 The new flag <literal>-fwarn-deprecated-flags</literal>,
263 controls whether we warn about deprecated flags and language
264 extensions. The warning is on by default.
269 The following language extensions are now marked as
270 deprecated; expect them to be removed in a future release:
275 <literal>RecordPuns</literal>
276 (use <literal>NamedFieldPuns</literal> instead)
281 <literal>PatternSignatures</literal>
282 (use <literal>ScopedTypeVariables</literal> instead)
289 The following flags are now marked as deprecated;
290 expect them to be removed in a future release:
295 <literal>-Onot</literal>
296 (use <literal>-O0</literal> instead)
301 <literal>-Wnot</literal>
302 (use <literal>-w</literal> instead)
307 <literal>-frewrite-rules</literal>
308 (use <literal>-fenable-rewrite-rules</literal> instead)
313 <literal>-no-link</literal>
314 (use <literal>-c</literal> instead)
319 <literal>-recomp</literal>
320 (use <literal>-fno-force-recomp</literal> instead)
325 <literal>-no-recomp</literal>
326 (use <literal>-fforce-recomp</literal> instead)
331 <literal>-syslib</literal>
332 (use <literal>-package</literal> instead)
337 <literal>-fth</literal>
338 (use the <literal>TemplateHaskell</literal> language
344 <literal>-ffi</literal>, <literal>-fffi</literal>
345 (use the <literal>ForeignFunctionInterface</literal>
351 <literal>-farrows</literal>
352 (use the <literal>Arrows</literal> language
358 <literal>-fgenerics</literal>
359 (use the <literal>Generics</literal> language
365 <literal>-fno-implicit-prelude</literal>
366 (use the <literal>NoImplicitPrelude</literal> language
372 <literal>-fbang-patterns</literal>
373 (use the <literal>BangPatterns</literal> language
379 <literal>-fno-monomorphism-restriction</literal>
380 (use the <literal>NoMonomorphismRestriction</literal> language
386 <literal>-fmono-pat-binds</literal>
387 (use the <literal>MonoPatBinds</literal> language
393 <literal>-fextended-default-rules</literal>
394 (use the <literal>ExtendedDefaultRules</literal> language
400 <literal>-fimplicit-params</literal>
401 (use the <literal>ImplicitParams</literal> language
407 <literal>-fscoped-type-variables</literal>
408 (use the <literal>ScopedTypeVariables</literal> language
414 <literal>-fparr</literal>
415 (use the <literal>PArr</literal> language
421 <literal>-fallow-overlapping-instances</literal>
422 (use the <literal>OverlappingInstances</literal> language
428 <literal>-fallow-undecidable-instances</literal>
429 (use the <literal>UndecidableInstances</literal> language
435 <literal>-fallow-incoherent-instances</literal>
436 (use the <literal>IncoherentInstances</literal> language
442 <literal>-optdep-s</literal>
443 (use <literal>-dep-suffix</literal> instead)
448 <literal>-optdep-f</literal>
449 (use <literal>-dep-makefile</literal> instead)
454 <literal>-optdep-w</literal>
460 <literal>-optdep--include-prelude</literal>
461 (use <literal>-include-pkg-deps</literal> instead)
466 <literal>-optdep--include-pkg-deps</literal>
467 (use <literal>-include-pkg-deps</literal> instead)
472 <literal>-optdep--exclude-module</literal>
473 (use <literal>-exclude-module</literal> instead)
478 <literal>-optdep-x</literal>
479 (use <literal>-exclude-module</literal> instead)
486 The following flags have been removed:
491 <literal>-no-link-chk</literal>
492 (has been a no-op since at least 6.0)
497 <literal>-fruntime-types</literal>
498 (has not been used for years)
503 <literal>-fhardwire-lib-paths</literal>
504 (use <literal>-dynload sysdep</literal>)
511 The <literal>-unreg</literal> flag, which was used to build
512 unregisterised code with a registerised compiler, has been
513 removed. Now you need to build an unregisterised compiler
514 if you want to build unregisterised code.
521 <title>GHC API changes</title>
526 There is now a Ghc Monad used to carry around GHC's
527 Session data. This Monad also provides exception handling
533 It is now possible to get the raw characters corresponding to
534 each token the lexer outputs, and thus to reconstruct the
540 GHCi implicitly brings all exposed modules into scope with
541 qualified module names. There is a new flag
542 <literal>-fimplicit-import-qualified</literal>
543 that controls this behaviour, so other GHC API clients can
544 specify whether or not they want it.
549 There is now haddock documentation for much of the GHC API.
556 <title>GHCi changes</title>
561 You can now force GHCi to interpret a module, rather than
562 loading its compiled code, by prepending a * character to its
567 Compiling A ( A.hs, interpreted )
573 By default, GHCi will not print bind results, e.g.
576 Prelude> c <- return 'c'
580 does not print <literal>'c'</literal>. Use
581 <literal>-fprint-bind-result</literal> if you want the old
587 GHCi now uses editline, rather than readline, for input.
588 This shouldn't affect its behaviour.
593 The GHCi prompt history is now saved in
594 <literal>~/.ghc/ghci_history</literal>.
599 GHCi now uses libffi to make FFI calls, which means that the
600 FFI now works in GHCi on a much wider range of platforms
601 (all those platforms that libffi supports).
608 <title>Runtime system changes</title>
613 The garbage collector can now use multiple threads in parallel.
614 The new <literal>-g<replaceable>n</replaceable></literal> RTS
615 flag controls it, e.g. run your program with
616 <literal>+RTS -g2 -RTS</literal> to use 2 threads.
617 The <option>-g</option> option is implied by the
618 usual <option>-N</option> option, so normally there will be
619 no need to specify it separately, although occasionally it
620 is useful to turn it off with <option>-g1</option>.</para>
621 <para>Do let us know if you experience strange effects,
622 especially an increase in GC time when using the parallel GC
623 (use <option>+RTS -s -RTS</option> to measure GC time).
624 See <xref linkend="rts-options-gc" /> for more details.</para>
628 It is now possible to generate a heap profile without
629 recompiling your program for profiling. Run the program
630 with <option>+RTS -hT</option> to generate a basic heap
631 profile, and use <command>hp2ps</command> as usual to
632 convert the heap profile into a <literal>.ps</literal> file
633 for viewing. See <xref linkend="rts-profiling" /> for more
639 If the user presses control-C while running a Haskell program
640 then the program gets an asynchronous UserInterrupt exception.
645 We now ignore SIGPIPE by default.
650 The <literal>-S</literal> and <literal>-s</literal> RTS flags
651 now send their output to stderr, rather than
652 <literal><replaceable>prog</replaceable>.stat</literal>,
658 The new <literal>-vg</literal> RTS flag provides some RTS trace
659 messages even in the non-debug RTS variants.
666 <title>runghc</title>
671 runghc now uses the compiler that it came with to run the
672 code, rather than the first compiler that it finds on the
678 If the program to run does not have a <literal>.lhs</literal>
679 extension then runghc now treats it as a <literal>.hs</literal>
680 file. In particular, this means that programs without an
686 <literal>runghc foo</literal> will now work if
687 <literal>foo.hs</literal> or <literal>foo.lhs</literal> exists.
692 runghc can now take the code to run from stdin.
699 <title>ghc-pkg</title>
703 <para>ghc-pkg will refuse to unregister a package on which
704 other packages depend, unless
705 the <option>––force</option> option is also
710 ghc-pkg now has a <literal>-no-user-package-conf</literal>
711 flag which instructs it to ignore the user's personal
717 ghc-pkg no longer allows you to register two packages that
723 ghc-pkg no longer allows you to register packages which have
724 unversioned dependencies.
729 There is a new command <literal>dump</literal> which is
730 similar to <literal>describe '*'</literal>, but in a format
731 that is designed to be parsable by other tools.
738 <title>Haddock</title>
743 Haddock 2 now comes with GHC.
750 <title>DPH changes</title>
755 DPH is now an extralib.
760 There is a new flag <literal>-Odph</literal> that sets the
761 flags recommended when using DPH. Currently it is equivalent
764 -O2 -fno-method-sharing -fdicts-cheap
765 -fmax-simplifier-iterations20 -fno-spec-constr-threshold
771 There are now flags <literal>-fdph-seq</literal> and
772 <literal>-fdph-par</literal> for selecting which DPH backend
778 The <literal>-fflatten</literal> flag has been removed. It
779 never worked and has now been superceded by vectorisation.
786 <title>Boot Libraries</title>
793 Version number 0.2.0.0 (was 0.1.0.0)
804 Version number 4.0.0.0 (was 3.0.2.0)
809 We also ship a base version 3.0.3.0, so legacy code should
814 <para>The <literal>Show</literal> instance
815 for <literal>Ratio</literal> now puts spaces around
816 the <literal>%</literal>, as required by Haskell 98.</para>
820 There is a new module <literal>Control.Category</literal>.
825 <literal>>>></literal> is no longer a method of the
826 <literal>Arrow</literal> class; instead
827 <literal>Category</literal> is a superclass of
828 <literal>Arrow</literal>.
833 <literal>pure</literal> is no longer a method of the
834 <literal>Arrow</literal> class; use <literal>arr</literal>
840 <literal>Control.Exception</literal> now uses extensible
841 exceptions. The old style of exceptions are still available
842 in <literal>Control.OldException</literal>, but we expect to
843 remove them in a future release.
848 There is a new function
849 <literal>System.Exit.exitSuccess :: IO a</literal>
850 analogous to the existing
851 <literal>System.Exit.exitFailure :: IO a</literal>.
856 There are new functions
857 <literal>Data.Either.lefts :: [Either a b] -> [a]</literal>,
858 <literal>Data.Either.rights :: [Either a b] -> [b]</literal>
861 Data.Either.partitionEithers :: [Either a b] -> ([a], [b])
868 <literal>Data.List.subsequences :: [a] -> [[a]]</literal>
869 gives all sublists of a list, e.g.
871 subsequences "abc" ==
872 ["","a","b","ab","c","ac","bc","abc"]
879 <literal>Data.List.permutations :: [a] -> [[a]]</literal>
880 gives all permutations of a list, e.g.
882 permutations "abc" ==
883 ["abc","bac","cba","bca","cab","acb"]
890 <literal>Data.Traversable.mapAccumL</literal> and
891 <literal>Data.Traversable.mapAccumR</literal> generalise their
892 <literal>Data.List</literal> counterparts to work on any
893 <literal>Traversable</literal> type.
899 <literal>Control.Exception.blocked :: IO Bool</literal>
900 tells you whether or not exceptions are blocked (as controlled
901 by <literal>Control.Exception.(un)block</literal>).
906 There is a new function
907 <literal>traceShow :: Show a => a -> b -> b</literal> in
908 <literal>Debug.Trace</literal>.
913 The type of <literal>Control.Monad.forever</literal> has
914 been generalised from
915 <literal>Monad m => m a -> m ()</literal> to
916 <literal>Monad m => m a -> m b</literal>.
921 The new value <literal>GHC.Exts.maxTupleSize</literal>
922 tells you the largest tuple size that can be used. This is
923 mostly of use in Template Haskell programs.
928 <literal>GHC.Exts</literal> now exports
929 <literal>Down(..)</literal>,
930 <literal>groupWith</literal>,
931 <literal>sortWith</literal> and
932 <literal>the</literal> which are used in the desugaring of
933 generalised comprehensions.
938 <literal>GHC.Exts</literal> no longer exports the
939 <literal>Integer</literal> internals. If you want them then
940 you need to get them directly from the
941 new <literal>integer</literal> package.
946 The new function <literal>GHC.Conc.threadStatus</literal>
947 allows you to ask whether a thread is running, blocked on
953 The <literal>Data.Generics</literal> hierarchy has been
954 moved to a new package <literal>syb</literal>.
959 The <literal>GHC.Prim</literal> and
960 <literal>GHC.PrimopWrappers</literal> modules have been
961 moved into a new <literal>ghc-prim</literal> package.
968 <title>bytestring</title>
972 Version number 0.9.0.1.2 (was 0.9.0.1.1)
983 Version number 1.6.0.1 (was 1.2.4.0)
988 Many API changes. See the Cabal docs for more information.
995 <title>containers</title>
999 Version number 0.2.0.0 (was 0.1.0.2)
1004 Various result type now use <literal>Maybe</literal> rather
1005 than allowing any Monad.
1012 <title>directory</title>
1016 Version number 1.0.0.2 (was 1.0.0.1)
1021 No longer defines the UNICODE CPP symbol for packages that
1029 <title>editline</title>
1033 This is a new bootlib, version 0.2.1.0.
1040 <title>filepath</title>
1044 Version number 1.1.0.1 (was 1.1.0.0)
1051 <title>ghc-prim</title>
1055 This is a new bootlib, version 0.1.0.0.
1062 <title>haskell98</title>
1066 Version number 1.0.1.0 (unchanged)
1077 Version number 0.5.0.2 (was 0.5.0.1)
1084 <title>integer</title>
1088 This is a new bootlib, version 0.1.0.0.
1095 <title>old-locale</title>
1099 Version number 1.0.0.1 (was 1.0.0.0)
1106 <title>old-time</title>
1110 Version number 1.0.0.1 (was 1.0.0.0)
1117 <title>packedstring</title>
1121 Version number 0.1.0.1 (was 0.1.0.0)
1128 <title>pretty</title>
1132 Version number 1.0.1.0 (was 1.0.0.0)
1137 There is a new combinator
1138 <literal>zeroWidthText :: String -> Doc</literal>
1139 for printing things like ANSI escape sequences.
1146 <title>process</title>
1150 Version number 1.0.1.0 (was 1.0.0.1)
1155 The <literal>System.Process</literal> API has been overhauled.
1156 The new API is a superset of the old API, however.
1163 <title>random</title>
1167 Version number 1.0.0.1 (was 1.0.0.0)
1174 <title>readline</title>
1178 This is no longer a bootlib; editline replaces it.
1189 This is a new bootlib, version 0.1.0.0.
1196 <title>template-haskell</title>
1200 Version number 2.3.0.0 (was 2.2.0.0)
1205 The datatypes now have support for Word primitives.
1210 <literal>currentModule :: Q String</literal> has been
1212 <literal>location :: Q Loc</literal>, where
1213 <literal>Loc</literal> is a new datatype.
1224 Version number 2.3.1.0 (was 2.3.0.1)
1229 The <literal>System.Posix.Terminal.BaudRate</literal> type
1230 now includes <literal>B57600</literal> and
1231 <literal>B115200</literal> constructors.
1238 <title>Win32</title>
1242 Version number 2.2.0.0 (was 2.1.1.1)
1247 No longer defines the UNICODE CPP symbol for packages that