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 There is a new languages extension PackageImports which allows
60 imports to be qualified with the package they should come
64 import "network" Network.Socket
67 See <xref linkend="package-imports" /> for more details.
72 In earlier versions of GHC, the recompilation checker didn't
73 notice changes in other packages meant that recompilation is
74 needed. This is now handled properly, using MD5 checksums of
80 When compiling with <literal>-fvia-C</literal>, we no longer
81 use the C header files. Instead we rely on all the type
82 information being given as part of the FFI import declaration.
83 This makes it more consistent with <literal>-fasm</literal>.
86 This means that, unlike <literal>-fasm</literal>,
87 <literal>-fvia-C</literal> is no longer able to
88 call varargs functions.
91 Also, if you were using <literal>-fvia-C</literal> because
92 your program didn't work with <literal>-fasm</literal>, then
93 it probably won't work with <literal>-fvia-C</literal> either
97 We recommend using <literal>-fasm</literal> (the default).
98 We expect to remove the <literal>-fvia-C</literal>
99 functionality in the 6.12 release.
104 GHC now treats the Unicode "Letter, Other" class as lowercase
105 letters. This is an arbitrary choice, but better than not
106 allowing them in identifiers at all. This may be revisited
112 In addition to the <literal>DEPRECATED</literal> pragma, you
113 can now attach arbitrary warnings to declarations with the new
114 <literal>WARNING</literal> pragma. See
115 <xref linkend="warning-deprecated-pragma" /> for more details.
120 If GHC is failing due to <literal>-Werror</literal>, then it
121 now emits a message telling you so.
126 GHC now warns about unrecognised pragmas, as they are often
127 caused by a typo. The
128 <literal>-fwarn-unrecognised-pragmas</literal> controls
129 whether this warning is emitted.
130 The warning is enabled by default.
136 <literal>-fwarn-dodgy-foreign-imports</literal> which controls
137 a new warning about FFI delcarations of the form
140 foreign import "f" f :: FunPtr t
143 on the grounds that it is probably meant to be
146 foreign import "&f" f :: FunPtr t
149 The warning is enabled by default.
154 External core (output only) is working again.
159 There is a new flag <literal>-dsuppress-uniques</literal> that
160 makes GHC's intermediate core easier to read. This flag cannot
161 be used when actually generating code.
166 There is a new flag <literal>-dno-debug-output</literal> that
167 suppresses all of the debug information when running a
168 compiler built with the <literal>DEBUG</literal> option.
173 A bug in earlier versions of GHC meant that sections didn't
174 always need to be parenthesised, e.g.
175 <literal>(+ 1, 2)</literal> was accepted. This has now been
181 The <literal>-fspec-threshold</literal> flag has been replaced
182 by <literal>-fspec-constr-threshold</literal> and
183 <literal>-fliberate-case-threshold</literal> flags.
184 The thresholds can be disabled by
185 <literal>-fno-spec-constr-threshold</literal> and
186 <literal>-fno-liberate-case-threshold</literal>.
191 The new flag <literal>-fsimplifier-phases</literal>
192 controls the number of simplifier phases run during
193 optimisation. These are numbered from n to 1 (by default, n=2).
194 Phase 0 is always run regardless of this flag.
199 Simplifier phases can have an arbitrary number of tags
200 assigned to them, and multiple phases can share the same tags.
201 The tags can be used as arguments to the new flag
202 <literal>-ddump-simpl-phases</literal>
203 to specify which phases are to be dumped.
208 <literal>-ddump-simpl-phases=main</literal> will dump the
209 output of phases 2, 1 and 0 of the initial simplifier run
210 (they all share the "main" tag) while
211 <literal>-ddump-simpl-phases=main:0</literal>
212 will dump only the output of phase 0 of that run.
216 At the moment, the supported tags are
217 main (the main, staged simplifier run (before strictness)),
218 post-worker-wrapper (after the w/w split),
219 post-liberate-case (after LiberateCase), and
220 final (final clean-up run)
224 The names are somewhat arbitrary and will change in the future.
229 The <literal>-fno-method-sharing</literal> flag is now
230 dynamic (it used to be static).
237 <title>Deprecated flags</title>
242 The new flag <literal>-fwarn-deprecated-flags</literal>,
243 controls whether we warn about deprecated flags and language
244 extensions. The warning is on by default.
249 The following language extensions are now marked as
250 deprecated; expect them to be removed in a future release:
255 <literal>RecordPuns</literal>
256 (use <literal>NamedFieldPuns</literal> instead)
261 <literal>PatternSignatures</literal>
262 (use <literal>ScopedTypeVariables</literal> instead)
269 The following flags are now marked as deprecated;
270 expect them to be removed in a future release:
275 <literal>-Onot</literal>
276 (use <literal>-O0</literal> instead)
281 <literal>-Wnot</literal>
282 (use <literal>-w</literal> instead)
287 <literal>-frewrite-rules</literal>
288 (use <literal>-fenable-rewrite-rules</literal> instead)
293 <literal>-no-link</literal>
294 (use <literal>-c</literal> instead)
299 <literal>-recomp</literal>
300 (use <literal>-fno-force-recomp</literal> instead)
305 <literal>-no-recomp</literal>
306 (use <literal>-fforce-recomp</literal> instead)
311 <literal>-syslib</literal>
312 (use <literal>-package</literal> instead)
317 <literal>-fth</literal>
318 (use the <literal>TemplateHaskell</literal> language
324 <literal>-ffi</literal>, <literal>-fffi</literal>
325 (use the <literal>ForeignFunctionInterface</literal>
331 <literal>-farrows</literal>
332 (use the <literal>Arrows</literal> language
338 <literal>-fgenerics</literal>
339 (use the <literal>Generics</literal> language
345 <literal>-fno-implicit-prelude</literal>
346 (use the <literal>NoImplicitPrelude</literal> language
352 <literal>-fbang-patterns</literal>
353 (use the <literal>BangPatterns</literal> language
359 <literal>-fno-monomorphism-restriction</literal>
360 (use the <literal>NoMonomorphismRestriction</literal> language
366 <literal>-fmono-pat-binds</literal>
367 (use the <literal>MonoPatBinds</literal> language
373 <literal>-fextended-default-rules</literal>
374 (use the <literal>ExtendedDefaultRules</literal> language
380 <literal>-fimplicit-params</literal>
381 (use the <literal>ImplicitParams</literal> language
387 <literal>-fscoped-type-variables</literal>
388 (use the <literal>ScopedTypeVariables</literal> language
394 <literal>-fparr</literal>
395 (use the <literal>PArr</literal> language
401 <literal>-fallow-overlapping-instances</literal>
402 (use the <literal>OverlappingInstances</literal> language
408 <literal>-fallow-undecidable-instances</literal>
409 (use the <literal>UndecidableInstances</literal> language
415 <literal>-fallow-incoherent-instances</literal>
416 (use the <literal>IncoherentInstances</literal> language
422 <literal>-optdep-s</literal>
423 (use <literal>-dep-suffix</literal> instead)
428 <literal>-optdep-f</literal>
429 (use <literal>-dep-makefile</literal> instead)
434 <literal>-optdep-w</literal>
440 <literal>-optdep--include-prelude</literal>
441 (use <literal>-include-pkg-deps</literal> instead)
446 <literal>-optdep--include-pkg-deps</literal>
447 (use <literal>-include-pkg-deps</literal> instead)
452 <literal>-optdep--exclude-module</literal>
453 (use <literal>-exclude-module</literal> instead)
458 <literal>-optdep-x</literal>
459 (use <literal>-exclude-module</literal> instead)
466 The following flags have been removed:
471 <literal>-no-link-chk</literal>
472 (has been a no-op since at least 6.0)
477 <literal>-fruntime-types</literal>
478 (has not been used for years)
483 <literal>-fhardwire-lib-paths</literal>
484 (use <literal>-dynload sysdep</literal>)
491 The <literal>-unreg</literal> flag, which was used to build
492 unregisterised code with a registerised compiler, has been
493 removed. Now you need to build an unregisterised compiler
494 if you want to build unregisterised code.
501 <title>GHC API changes</title>
506 There is now a Ghc Monad used to carry around GHC's
507 Session data. This Monad also provides exception handling
513 It is now possible to get the raw characters corresponding to
514 each token the lexer outputs, and thus to reconstruct the
520 GHCi implicitly brings all exposed modules into scope with
521 qualified module names. There is a new flag
522 <literal>-fimplicit-import-qualified</literal>
523 that controls this behaviour, so other GHC API clients can
524 specify whether or not they want it.
529 There is now haddock documentation for much of the GHC API.
536 <title>GHCi changes</title>
541 You can now force GHCi to interpret a module, rather than
542 loading its compiled code, by prepending a * character to its
547 Compiling A ( A.hs, interpreted )
553 By default, GHCi will not print bind results, e.g.
556 Prelude> c <- return 'c'
560 does not print <literal>'c'</literal>. Use
561 <literal>-fprint-bind-result</literal> if you want the old
567 GHCi now uses editline, rather than readline, for input.
568 This shouldn't affect its behaviour.
573 The GHCi prompt history is now saved in
574 <literal>~/.ghc/ghci_history</literal>.
579 GHCi can now use libffi to make FFI calls, which means that
580 it now works on all platforms that libffi supports.
587 <title>Runtime system changes</title>
592 If the user presses control-C while running a Haskell program
593 then the program gets an asynchronous UserInterrupt exception.
598 We now ignore SIGPIPE by default.
603 The garbage collector can now use multiple threads in parallel.
604 The new <literal>-g<replaceable>n</replaceable></literal> RTS
605 flag controls it, e.g. run your program with
606 <literal>+RTS -g2 -RTS</literal> to use 2 threads.
607 Don't use more threads than you have CPUs.
608 Only major GCs are parallelised; minor GCs are still sequential.
613 The <literal>-S</literal> and <literal>-s</literal> RTS flags
614 now send their output to stderr, rather than
615 <literal><replaceable>prog</replaceable>.stat</literal>,
621 The new <literal>-vg</literal> RTS flag provides some RTS trace
622 messages even in the non-debug RTS variants.
629 <title>runghc</title>
634 runghc now uses the compiler that it came with to run the
635 code, rather than the first compiler that it finds on the
641 If the program to run does not have a <literal>.lhs</literal>
642 extension then runghc now treats it as a <literal>.hs</literal>
643 file. In particular, this means that programs without an
649 <literal>runghc foo</literal> will now work if
650 <literal>foo.hs</literal> or <literal>foo.lhs</literal> exists.
655 runghc can now take the code to run from stdin.
662 <title>ghc-pkg</title>
667 ghc-pkg now has a <literal>-no-user-package-conf</literal>
668 flag which instructs it to ignore the user's personal
674 ghc-pkg no longer allows you to register two packages that
680 ghc-pkg no longer allows you to register packages which have
681 unversioned dependencies.
686 There is a new command <literal>dump</literal> which is
687 similar to <literal>describe '*'</literal>, but in a format
688 that is designed to be parsable by other tools.
695 <title>Haddock</title>
700 Haddock 2 now comes with GHC.
707 <title>DPH changes</title>
712 DPH is now an extralib.
717 There is a new flag <literal>-Odph</literal> that sets the
718 flags recommended when using DPH. Currently it is equivalent
721 -O2 -fno-method-sharing -fdicts-cheap
722 -fmax-simplifier-iterations20 -fno-spec-constr-threshold
728 There are now flags <literal>-fdph-seq</literal> and
729 <literal>-fdph-par</literal> for selecting which DPH backend
735 The <literal>-fflatten</literal> flag has been removed. It
736 never worked and has now been superceded by vectorisation.