Finish the release note TODOs
[ghc.git] / docs / users_guide / 7.4.1-notes.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-7-4-1">
3 <title>Release notes for version 7.4.1</title>
4
5 <para>
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 7.2 branch.
9 </para>
10
11 <sect2>
12 <title>Highlights</title>
13
14 <para>
15 The highlights, since the 7.0 branch, are:
16 </para>
17
18 <itemizedlist>
19 <listitem>
20 <para>
21 The <literal>Num</literal> class no longer has
22 <literal>Eq</literal> or <literal>Show</literal>
23 superclasses. A number of other classes and
24 functions have therefore gained explicit
25 <literal>Eq</literal> or <literal>Show</literal>
26 constraints, rather than relying on a
27 <literal>Num</literal> constraint to provide them.
28 </para>
29
30 <para>
31 You can make code that works with both
32 Haskell98/Haskell2010 and GHC by:
33 <itemizedlist>
34 <listitem>
35 <para>
36 Whenever you make a <literal>Num</literal> instance
37 of a type, also make <literal>Show</literal> and
38 <literal>Eq</literal> instances, and
39 </para>
40 </listitem>
41 <listitem>
42 <para>
43 Whenever you give a function, instance or class a
44 <literal>Num t</literal> constraint, also give it
45 <literal>Show t</literal> and
46 <literal>Eq t</literal> constraints.
47 </para>
48 </listitem>
49 </itemizedlist>
50 </para>
51 </listitem>
52
53 <listitem>
54 <para>
55 There is a new feature Safe Haskell
56 (<literal>-XSafe</literal>,
57 <literal>-XTrustworthy</literal>,
58 <literal>-XUnsafe</literal>):
59 <xref linkend="safe-haskell" />.
60 The design has changed since 7.2.
61 </para>
62 </listitem>
63
64 <listitem>
65 <para>
66 There is a new feature kind polymorphism
67 (<literal>-XPolyKinds</literal>):
68 <xref linkend="kind-polymorphism" />.
69 A side-effect of this is that, when the extension is not
70 enabled, in certain circumstances kinds are now defaulted to
71 <literal>*</literal>
72 rather than being inferred.
73 </para>
74 </listitem>
75
76 <listitem>
77 <para>
78 There is a new feature constraint kinds (-XConstraintKinds):
79 <xref linkend="constraint-kind" />.
80 </para>
81 </listitem>
82
83 <listitem>
84 <para>
85 It is now possible to give any sort of declaration at the
86 ghci prompt:
87 <xref linkend="ghci-decls" />.
88 </para>
89 </listitem>
90
91 <listitem>
92 <para>
93 The profiling and hpc implementations have been merged and
94 overhauled. Visible changes include renaming of profiling
95 flags and the cost-centre stacks have a new semantics, which
96 should in most cases result in more useful and intuitive
97 profiles. The <literal>+RTS -xc</literal> flag now also gives
98 a stack trace.
99 </para>
100 </listitem>
101
102 <listitem>
103 <para>
104 It is now possible to write compiler plugins:
105 <xref linkend="compiler-plugins" />.
106 </para>
107 </listitem>
108
109 <listitem>
110 <para>
111 DPH support has been significantly improved.
112 </para>
113 </listitem>
114
115 <listitem>
116 <para>
117 There is now preliminary support for registerised
118 compilation on the ARM platform, using LLVM.
119 </para>
120 </listitem>
121 </itemizedlist>
122 </sect2>
123
124 <sect2>
125 <title>Full details</title>
126 <sect3>
127 <title>Language</title>
128 <itemizedlist>
129 <listitem>
130 <para>
131 GHC previously accepted this code:
132 </para>
133 <programlisting>
134 data T f = T
135
136 class C a where
137 t :: f a -> T f
138 </programlisting>
139 <para>
140 inferring the kind of <literal>f</literal> as
141 <literal>* -> *</literal>, but it now (correctly,
142 according to the Haskell 98 and Haskell 2010
143 standards) rejects it. You need to write this
144 instead:
145 </para>
146 <programlisting>
147 {-# LANGUAGE KindSignatures #-}
148
149 data T (f :: * -> *) = T
150
151 class C a where
152 t :: f a -> T f
153 </programlisting>
154 </listitem>
155
156 <listitem>
157 <para>
158 When the new <literal>DataKinds</literal> extension
159 is enabled, suitable user-defined datatypes are
160 automatically "promoted" to kinds, e.g.
161 <literal>Nat</literal> here:
162 </para>
163 <programlisting>
164 data Nat = Zero | Succ Nat
165 data Vector :: * -> Nat -> * where
166 VNil :: Vector a Zero
167 VCons :: a -> Vector a n -> Vector a (Succ n)
168 </programlisting>
169 <para>
170 See <xref linkend="promotion" /> for more
171 information.
172 </para>
173 </listitem>
174
175 <listitem>
176 <para>
177 There is a new extension
178 <literal>PolyKinds</literal> which make it possible
179 for kinds to be polymorphic. For example, instead of
180 </para>
181 <programlisting>
182 class Typeable (t :: *) where
183 typeOf :: t -> TypeRep
184
185 class Typeable1 (t :: * -> *) where
186 typeOf1 :: t a -> TypeRep
187
188 [...]
189
190 instance Typeable Int where typeOf _ = TypeRep
191 instance Typeable1 [] where typeOf _ = TypeRep
192 </programlisting>
193 <para>
194 you can now say
195 </para>
196 <programlisting>
197 data Proxy t = Proxy
198
199 class Typeable t where
200 typeOf :: Proxy t -> TypeRep
201
202 instance Typeable Int where typeOf _ = TypeRep
203 instance Typeable [] where typeOf _ = TypeRep
204 </programlisting>
205 <para>
206 and the kind of <literal>Proxy</literal> is
207 polymorphic:
208 <literal>forall k. k -> *</literal>.
209 </para>
210
211 <para>
212 See
213 <xref linkend="kind-polymorphism" />
214 for more information.
215 </para>
216 </listitem>
217
218 <listitem>
219 <para>
220 The Safe Haskell feature, new in GHC 7.2, has been
221 redesigned in GHC 7.4. The motivation was to stop
222 Safe Haskell from causing compilation failures for
223 people not interested in using it.
224 </para>
225
226 <para>
227 GHC now tries to infer whether a module is
228 safe, unless the new
229 <literal>-fno-safe-infer</literal> flag is given.
230 Therefore, as well as the old
231 <literal>-XSafe</literal>, there is now a
232 <literal>-XUnsafe</literal>
233 flag to explicitly state that a module should be
234 treated as unsafe. The old
235 <literal>-XSafeImports</literal> has been removed.
236 </para>
237
238 <para>
239 The new flags <literal>-fwarn-safe</literal> and
240 <literal>-fwarn-unsafe</literal> give warnings
241 when a module is inferred to be safe or unsafe,
242 respectively.
243 </para>
244
245 <para>
246 There is a new flag
247 <literal>-fpackage-trust</literal>. This controls
248 whether packages containing imported trustworthy
249 modules must be marked as
250 <literal>trusted</literal>.
251 </para>
252 </listitem>
253
254 <listitem>
255 <para>
256 There is now a <literal>NOUNPACK</literal>
257 pragma, which does the opposite of the existing
258 <literal>PACK</literal> pragma. It is mainly useful
259 when <literal>-funbox-strict-fields</literal> has
260 been used, allowing you to declare that certain
261 fields should not be unpacked.
262 </para>
263 </listitem>
264
265 <listitem>
266 <para>
267 GHC now requires, as per the standard, that
268 if a <literal>newtype</literal> is used in an
269 FFI declaration, then the constructor for that
270 type must be in scope. For now you only get a
271 warning if it is not, but in the future this will
272 be an error.
273 </para>
274 </listitem>
275
276 <listitem>
277 <para>
278 There is a new extension
279 <literal>ConstraintKind</literal>
280 which adds a new kind, called
281 <literal>Constraint</literal>,
282 to GHC's type system. Then, for example,
283 </para>
284 <programlisting>
285 Show :: * -> Constraint
286 (?x::Int) :: Constraint
287 (Int ~ a) :: Constraint
288 </programlisting>
289 <para>
290 You can now write <em>any</em> type with kind
291 <literal>Constraint</literal> on the left of
292 <literal>=&gt;</literal>, i.e. you can use type
293 synonyms, type variables, indexed types, etc.
294 </para>
295 </listitem>
296
297 <listitem>
298 <para>
299 It is now possible to derive an
300 <literal>Eq</literal> instance for types with no
301 constructors.
302 </para>
303 </listitem>
304
305 <listitem>
306 <para>
307 In the <literal>MonadComprehensions</literal>
308 extension, the
309 <literal>then group by e</literal>
310 form has been removed. You now need to explicitly
311 say
312 <literal>then group by e using groupWith</literal>.
313 </para>
314 </listitem>
315
316 <listitem>
317 <para>
318 There is a new extension
319 <literal>TraditionalRecordSyntax</literal> which is
320 on by default. When turned off, the standard Haskell
321 record syntax cannot be used.
322 </para>
323 </listitem>
324
325 <listitem>
326 <para>
327 In DPH, it is now possible to vectorise things
328 imported from other modules.
329 </para>
330 </listitem>
331
332 <listitem>
333 <para>
334 In DPH, the <literal>VECTORISE</literal> and
335 <literal>VECTORISE SCALAR</literal> pragmas now have
336 <literal>type</literal>, <literal>class</literal>
337 and <literal>instance</literal> variants.
338 See
339 <ulink url="http://hackage.haskell.org/trac/ghc/wiki/DataParallel/VectPragma">VectPragma</ulink> for more details.
340 </para>
341 </listitem>
342
343 <listitem>
344 <para>
345 The <literal>-fdph-seq</literal>,
346 <literal>-fdph-par</literal>,
347 <literal>-fdph-this</literal> and
348 <literal>-fdph-none</literal> flags have been
349 removed. The vectoriser is now controlled by which
350 <literal>Data.Array.Parallel</literal> and
351 <literal>Data.Array.Parallel.Prim</literal>
352 modules are in scope.
353 </para>
354 </listitem>
355
356 <listitem>
357 <para>
358 GHC now warns consistently about unused type
359 variables.
360 </para>
361 </listitem>
362
363 <listitem>
364 <para>
365 GHC now implements the static pattern semantics
366 as clarified by the Haskell' committee, i.e.
367 the binding <literal>p = e</literal> is now
368 equivalent to
369 </para>
370 <programlisting>
371 t = e
372 f = case t of p -> f
373 g = case t of p -> g
374 </programlisting>
375 <para>
376 where <literal>f</literal> and <literal>g</literal>
377 are the variables bound by <literal>p</literal>.
378 </para>
379 </listitem>
380
381 <listitem>
382 <para>
383 The <literal>MonoPatBinds</literal>
384 extension is now deprecated, and has no effect.
385 </para>
386 </listitem>
387
388 <listitem>
389 <para>
390 GHC will now reject a declaration if it infers a
391 type for it that is impossible to use unambiguously.
392 For example, given
393 </para>
394 <programlisting>
395 class Wob a b where
396 to :: a -> b
397 from :: b -> a
398
399 foo x = [x, to (from x)]
400 </programlisting>
401 <para>
402 GHC would infer the ambiguous type
403 </para>
404 <programlisting>
405 foo :: forall a b. Wob a b => b -> [b]
406 </programlisting>
407 <para>
408 but it is impossible to use
409 <literal>foo</literal> as
410 <literal>a</literal> will always be ambiguous,
411 so the declaration is rejected.
412 </para>
413 </listitem>
414
415 <listitem>
416 <para>
417 It is now possible for associated types to have
418 fresh parameters, e.g. this is now allowed:
419 </para>
420 <programlisting>
421 class C a where
422 type T a b :: *
423
424 instance C Int
425 type T Int b = b -> b
426 </programlisting>
427 <para>
428 where <literal>T</literal> has a type index
429 <literal>b</literal> that is not one of the class
430 variables.
431 </para>
432 </listitem>
433
434 <listitem>
435 <para>
436 It is now possible for multiple associated type
437 declarations to be given in a single instance,
438 e.g.
439 </para>
440 <programlisting>
441 class C a where
442 type T a x :: *
443
444 data A
445 data B
446
447 instance C Int where
448 type T Int A = Int
449 type T Int B = Bool
450 </programlisting>
451 </listitem>
452
453 <listitem>
454 <para>
455 The import and export of type family data
456 constructors has been refined. You now need to be
457 more explicit about what should be exported.
458 </para>
459 </listitem>
460
461 <listitem>
462 <para>
463 Associated type default declarations are now
464 fully supported. These allow you to specify
465 a default definition for a type that will be used
466 if an instance doesn't define its own type, e.g.
467 </para>
468 <programlisting>
469 class Cls a where
470 type Typ a
471 type Typ a = Maybe a
472
473 instance Cls Int where
474 </programlisting>
475 <para>
476 See <xref linkend="assoc-decl-defs" /> for more
477 information.
478 </para>
479 </listitem>
480
481 <listitem>
482 <para>
483 You can now specify what simplifier phases
484 <literal>SPECIALISE</literal> pragmas should be
485 applied in, in the same way that you could for
486 <literal>RULE</literal> pragmas, e.g. to specialise
487 <literal>foo</literal> only in phase 1 use:
488 </para>
489 <programlisting>
490 {-# SPECIALISE [1] foo :: Int -> Int #-}
491 </programlisting>
492 </listitem>
493
494 <listitem>
495 <para>
496 The typechecker is now able to do full constraint
497 solving under a for-all, i.e. it can cope with the
498 unification
499 <literal>forall a. t1 ~ forall a. t2</literal>.
500 </para>
501 </listitem>
502
503 <listitem>
504 <para>
505 The kind <literal>?</literal> has been renamed to
506 <literal>OpenKind</literal>, and
507 <literal>??</literal> to <literal>ArgKind</literal>.
508 </para>
509 </listitem>
510 </itemizedlist>
511 </sect3>
512
513 <sect3>
514 <title>Compiler</title>
515 <itemizedlist>
516 <listitem>
517 <para>
518 The recompilation checker now takes into account
519 what flags were used when compiling. For example,
520 if you first run <literal>ghc -c Foo.hs</literal>,
521 and then <literal>ghc -DBAR -c Foo.hs</literal>,
522 then GHC will now recompile
523 <literal>Foo.hs</literal>.
524 </para>
525 </listitem>
526
527 <listitem>
528 <para>
529 The recompilation checker now also tracks files that
530 are <literal>#include</literal>d in Haskell sources.
531 </para>
532 <para>
533 Note that we still don't get
534 <literal>#include</literal>d files in the
535 <literal>ghc -M</literal> output.
536 </para>
537 </listitem>
538
539 <listitem>
540 <para>
541 The simplifier now maintains a count of how much
542 transformation it does, and prints a warning if
543 that exceeds a limit defined by the new
544 <literal>-fsimpl-tick-factor=N</literal> flag
545 (default is 100). The intention is to detect when
546 it seems likely that GHC has gone into an infinite
547 loop. In the future, GHC may give an error when the
548 limit is exceeded.
549 </para>
550 </listitem>
551
552 <listitem>
553 <para>
554 There is a new flag
555 <literal>-fpedantic-bottoms</literal> which makes
556 GHC be more precise about its treatment of bottoms.
557 In particular, it stops GHC eta-expanding through
558 case expressions (which means performance can be
559 worse).
560 </para>
561 </listitem>
562
563 <listitem>
564 <para>
565 GHC now knows how to call gcc to compile
566 objective-c++ (<literal>.mm</literal> or
567 <literal>.M</literal> files).
568 </para>
569 </listitem>
570
571 <listitem>
572 <para>
573 The <literal>-optm</literal>
574 flag, which allowed extra arguments to be passed to
575 the mangler, is now deprecated and does nothing.
576 It will be removed in a future release.
577 </para>
578 </listitem>
579
580 <listitem>
581 <para>
582 GHC now works with LLVM version 3.0, and requires at
583 least version 2.8.
584 </para>
585 </listitem>
586
587 <listitem>
588 <para>
589 We now pass gcc
590 <literal>-no_compact_unwind</literal>
591 on OS X x86 (as well as x86_64), in order to avoid
592 the
593 </para>
594 <programlisting>
595 ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog
596 </programlisting>
597 <para>
598 warning.
599 </para>
600 </listitem>
601
602 <listitem>
603 <para>
604 The context stack depth, which defines how deeply
605 the type constraint solver may reason, has been
606 increased from 20 to 200, as some people were
607 running into the limit.
608 </para>
609 </listitem>
610
611 <listitem>
612 <para>
613 On x86, the new <literal>-msse4.2</literal>
614 flag tells GHC that it may use SSE4.2 instructions.
615 </para>
616 </listitem>
617
618 <listitem>
619 <para>
620 There is a new flag
621 <literal>-dno-llvm-mangler</literal>
622 which means the LLVM mangler isn't run. It is mainly
623 useful when debugging GHC.
624 </para>
625 </listitem>
626
627 <listitem>
628 <para>
629 There is a new flag
630 <literal>-dsuppress-var-kinds</literal>
631 which can make the output clearer when
632 <literal>-dppr-debug</literal> is also used.
633 </para>
634 </listitem>
635
636 <listitem>
637 <para>
638 The <literal>-keep-llvm-files</literal>
639 flag now implies <literal>-fllvm</literal>.
640 </para>
641 </listitem>
642
643 <listitem>
644 <para>
645 The <literal>-split-objs</literal> flag can now be
646 used with the LLVM backend.
647 </para>
648 </listitem>
649
650 <listitem>
651 <para>
652 There is a new flag <literal>-dumpdir</literal>
653 which allows you to specify the directory in which
654 the output of the <literal>-ddump-*</literal> flags
655 should be put when <literal>-ddump-to-file</literal>
656 is used. The <literal>-outputdir</literal> flag will
657 now also set the dump directory.
658 </para>
659 </listitem>
660
661 <listitem>
662 <para>
663 Bitrotted registerised ports for mips, ia64, alpha,
664 hppa1 and m68k have been removed.
665 </para>
666 </listitem>
667 </itemizedlist>
668 </sect3>
669
670 <sect3>
671 <title>GHCi</title>
672 <itemizedlist>
673 <listitem>
674 <para>
675 It is now possible to give any top-level
676 declaration at the GHCi prompt, e.g.
677 </para>
678 <programlisting>
679 Prelude> data D = C Int
680 Prelude> let f (C i) = i in f (C 5)
681 5
682 </programlisting>
683 <para>
684 The current set of declarations are shown by
685 the new
686 <literal>:show bindings</literal>
687 command. See
688 <xref linkend="ghci-decls" />.
689 for more information
690 </para>
691 </listitem>
692
693 <listitem>
694 <para>
695 There is a new GHCi command
696 <literal>:kind!</literal>
697 which is like
698 <literal>:kind</literal>
699 except it also prints the normalised type; e.g., given
700 </para>
701 <programlisting>
702 type family F a
703 type instance F Int = Bool
704 </programlisting>
705 <para>
706 we get
707 </para>
708 <programlisting>
709 *Main> :kind F Int
710 F Int :: *
711 *Main> :kind! F Int
712 F Int :: *
713 = Bool
714 </programlisting>
715 </listitem>
716
717 <listitem>
718 <para>
719 There is a new flag
720 <literal>-fno-ghci-history</literal>
721 which stops GHCi from loading and saving the GHCi
722 command history from and to
723 <literal>~/.ghc/ghci_history</literal>.
724 </para>
725 </listitem>
726
727 <listitem>
728 <para>
729 Library loading in GHCi has been improved; in
730 particular, loading
731 <literal>libstdc++.so</literal>
732 now works, and GHCi will use
733 <literal>.a</literal> archives to satisfy
734 <literal>-lfoo</literal> flags on its commandline.
735 </para>
736 </listitem>
737
738 <listitem>
739 <para>
740 When using
741 <literal>:load</literal>, GHCi will not unload
742 the current modules until it has successfully loaded
743 the new ones. This fixes this old problem:
744 </para>
745 <programlisting>
746 Prelude> :l foo
747 target `foo' is not a module name or a source file
748 >
749 </programlisting>
750 </listitem>
751 </itemizedlist>
752 </sect3>
753
754 <sect3>
755 <title>Template Haskell</title>
756 <itemizedlist>
757 <listitem>
758 <para>
759 GHC used to treat <literal>\|</literal>
760 and <literal>\]</literal> within quasiquote as
761 escaped characters, parsing them as
762 <literal>|</literal> and <literal>]</literal>
763 respectively. It now does not treat anything
764 specially; if you would like to be able to include
765 sequences such as <literal>|]</literal> inside a
766 quasi-quote then you must define your own escaping
767 mechanism in the quasi-quoter.
768 </para>
769 </listitem>
770 <listitem>
771 <para>
772 The interaction between the recompilation checker
773 and Template Haskell has been improved. We now
774 track which modules are used by splices, and if
775 a module is changed then any splices that use it
776 will need to be rerun.
777 </para>
778 </listitem>
779 </itemizedlist>
780 </sect3>
781
782 <sect3>
783 <title>Profiling</title>
784 <itemizedlist>
785 <listitem>
786 <para>
787 The profiling, coverage (HPC) and breakpoints
788 infrastructure has been overhauled, and the
789 three systems are now much more unified.
790 </para>
791
792 <para>
793 As a result of these changes, the cost-centre
794 stacks have a new semantics, which should give
795 more intuitive profiling results. HPC is also
796 slightly improved: In particular, unused derived
797 instances and record field names are now
798 highlighted, and entry counts are more accurate.
799 </para>
800
801 <para>
802 The <literal>+RTS -xc</literal> flag now also gives
803 a stack trace.
804 </para>
805
806 <para>
807 The
808 <literal>-auto-all</literal> flag has been renamed
809 to <literal>-fprof-auto</literal>,
810 <literal>-auto</literal> renamed to
811 <literal>-fprof-auto-exported</literal>, and
812 <literal>-caf-all</literal> renamed to
813 <literal>-fprof-cafs</literal>. The old names are
814 also still accepted for now.
815 </para>
816
817 <para>
818 There are also two new flags.
819 The <literal>-fprof-auto-top</literal> flag
820 annotates all top-level bindings with SCCs, and
821 the <literal>-fprof-auto-calls</literal> flag
822 adds SCCs to all applications. This last flag
823 is particularly useful for stack traces.
824 </para>
825
826 <para>
827 Another new flag
828 <literal>-fprof-no-count-entries</literal>
829 indicates that entry counts do not need to be
830 maintained. This makes profiled code faster, and
831 is particularly useful when heap profiling, as
832 heap profiles do not use the entry counts.
833 </para>
834 </listitem>
835
836 <listitem>
837 <para>
838 Cost centre names are now in UTF8 rather than
839 Latin-1.
840 </para>
841 </listitem>
842
843 <listitem>
844 <para>
845 There is now better heap profiling support for
846 pinned objects (e.g. <literal>ByteStrings</literal>).
847 Previously we were completely ignoring them,
848 due to technical difficulties, but now count
849 all the pinned object space (including gaps between
850 pinned objects) as being type
851 <literal>ARR_WORDS</literal>. This isn't ideal, but
852 at least we do now account for the memory, and give
853 it the right type.
854 </para>
855 </listitem>
856
857 <listitem>
858 <para>
859 The quotes in an <literal>SCC</literal> pragma can
860 now be omitted if the SCC name is a valid Haskell
861 variable name, e.g.
862 <literal>{-# SCC my_function #-} expr</literal>.
863 </para>
864 </listitem>
865
866 <listitem>
867 <para>
868 It is now possible to use profiling when running on
869 multiple capabilities (i.e. when running with
870 <literal>+RTS -N</literal>). There is a new built-in
871 cost centre called <literal>IDLE</literal>, which
872 records the ticks of idle capabilities.
873 </para>
874
875 <para>
876 There are still some rough edges. In particular,
877 it is strongly recommended that you use the
878 <literal>-fno-prof-count-entries</literal> flag
879 or the program will run very slowly.
880 </para>
881 </listitem>
882 </itemizedlist>
883 </sect3>
884
885 <sect3>
886 <title>Event logging</title>
887 <itemizedlist>
888
889 <listitem>
890 <para>
891 There are new eventlog events
892 <literal>EVENT_SPARK_COUNTERS</literal>
893 <literal>EVENT_SPARK_CREATE</literal>
894 <literal>EVENT_SPARK_DUD</literal>
895 <literal>EVENT_SPARK_OVERFLOW</literal>
896 <literal>EVENT_SPARK_RUN</literal>
897 <literal>EVENT_SPARK_STEAL</literal>
898 <literal>EVENT_SPARK_FIZZLE</literal> and
899 <literal>EVENT_SPARK_GC</literal> for giving
900 information about sparks.
901 </para>
902 </listitem>
903
904 <listitem>
905 <para>
906 There is a new eventlog event
907 <literal>EVENT_WALL_CLOCK_TIME</literal>
908 which is used for matching the time of events
909 between different processes.
910 </para>
911 </listitem>
912
913 <listitem>
914 <para>
915 There is a new eventlog event
916 <literal>EVENT_THREAD_LABEL</literal>
917 which is emitted by the existing
918 <literal>GHC.Conc.labelThread</literal>
919 function. This allows tools such as
920 ThreadScope to use thread labels rather
921 than thread numbers.
922 </para>
923 </listitem>
924
925 <listitem>
926 <para>
927 The eventlog class <literal>g</literal>
928 is no longer ignored, but now controls whether
929 events related to the garbage collector are emitted.
930 There are also new event classes
931 <literal>p</literal> and
932 <literal>f</literal>, which contain sampled
933 (approximate) and full (fully accurate)
934 spark-related events respectively, and
935 <literal>u</literal> which contains user events.
936 </para>
937
938 <para>
939 There is also a meta eventlog class
940 <literal>a</literal> which, when enabled or
941 disabled, enables or disables all the classes.
942 </para>
943
944 <para>
945 By default, all classes apart from
946 <literal>f</literal> are enabled.
947 </para>
948 </listitem>
949
950 <listitem>
951 <para>
952 On Windows, if the program name ends in
953 <literal>.exe</literal> then the
954 <literal>.exe</literal> is removed when making
955 the eventlog filename.
956 </para>
957 </listitem>
958 </itemizedlist>
959 </sect3>
960
961 <sect3>
962 <title>Runtime system</title>
963 <itemizedlist>
964 <listitem>
965 <para>
966 The restrictions on what
967 <literal>+RTS</literal>
968 flags are available by default has changed.
969 By default, you can now use the
970 <literal>-t</literal>,
971 <literal>-T</literal>,
972 <literal>-s</literal> and
973 <literal>-S</literal> RTS flags, provided you do not
974 give them a filename argument.
975 </para>
976
977 <para>
978 Additionally, when linking with
979 <literal>-threaded</literal>, you can now use the
980 <literal>+RTS -N</literal> flag without having
981 to link with <literal>-rtsopts</literal>.
982 Also, when linking with "developer" ways
983 (<literal>-debug</literal>,
984 <literal>-eventlog</literal> and
985 <literal>-prof</literal>) all the way-specific flags
986 are allowed; for example,
987 <literal>+RTS -h</literal> is allowed when linking
988 with <literal>-prof</literal>.
989 </para>
990 </listitem>
991
992 <listitem>
993 <para>
994 There is a new RTS flag
995 <literal>-T</literal>, which makes the RTS collect
996 statistics (memory usage, etc) but not give any
997 output. The new <literal>GHC.Stats</literal>
998 module in the <literal>base</literal> package
999 provides access to this data.
1000 </para>
1001 </listitem>
1002
1003 <listitem>
1004 <para>
1005 You can now give the RTS flag
1006 <literal>-H</literal>
1007 (without an argument) and the runtime system
1008 will infer a sensible value to use. See
1009 <xref linkend="rts-options-gc" /> for more details.
1010 </para>
1011 </listitem>
1012
1013 <listitem>
1014 <para>
1015 When using <literal>-no-hs-main</literal>
1016 and starting the runtime system yourself,
1017 if you wish to pass RTS flags then you will now
1018 need to use the new <literal>hs_init_ghc</literal>
1019 function. See <xref linkend="using-own-main" />
1020 for details.
1021 </para>
1022 </listitem>
1023
1024 <listitem>
1025 <para>
1026 The runtime system now supports using
1027 <literal>forkProcess</literal>
1028 when running with multiple capabilities
1029 (<literal>+RTS -N</literal>).
1030 </para>
1031 </listitem>
1032 </itemizedlist>
1033 </sect3>
1034
1035 <sect3>
1036 <title>Build system</title>
1037 <itemizedlist>
1038 <listitem>
1039 <para>
1040 You can now build GHC with Alex 3.0.
1041 </para>
1042 </listitem>
1043
1044 <listitem>
1045 <para>
1046 On OS X, with XCode 4.0 and 4.1, GHC will use
1047 gcc-4.2 rather than gcc (which is based on LLVM,
1048 and currently produces slower code for GHC).
1049 </para>
1050 </listitem>
1051
1052 <listitem>
1053 <para>
1054 There is now preliminary support for registerised
1055 compilation on the ARM platform, using LLVM.
1056 </para>
1057 </listitem>
1058
1059 <listitem>
1060 <para>
1061 Dynamic libraries are now supported on OSX x86_64.
1062 </para>
1063 </listitem>
1064
1065 <listitem>
1066 <para>
1067 GHCi is now supported on kfreebsdgnu platforms.
1068 </para>
1069 </listitem>
1070
1071 <listitem>
1072 <para>
1073 GHC now recognises the s390x architecture.
1074 </para>
1075 </listitem>
1076 </itemizedlist>
1077 </sect3>
1078 </sect2>
1079
1080 <sect2>
1081 <title>Libraries</title>
1082
1083 <para>
1084 There have been some changes that have effected multiple
1085 libraries:
1086 </para>
1087
1088 <itemizedlist>
1089 <listitem>
1090 <para>
1091 The <literal>Num</literal> class no longer has
1092 <literal>Eq</literal> or <literal>Show</literal>
1093 superclasses. A number of other classes and
1094 functions have therefore gained explicit
1095 <literal>Eq</literal> or <literal>Show</literal>
1096 constraints, rather than relying on a
1097 <literal>Num</literal> constraint to provide them.
1098 </para>
1099
1100 <para>
1101 You can make code that works with both
1102 Haskell98/Haskell2010 and GHC by:
1103 <itemizedlist>
1104 <listitem>
1105 <para>
1106 Whenever you make a <literal>Num</literal> instance
1107 of a type, also make <literal>Show</literal> and
1108 <literal>Eq</literal> instances, and
1109 </para>
1110 </listitem>
1111 <listitem>
1112 <para>
1113 Whenever you give a function, instance or class a
1114 <literal>Num t</literal> constraint, also give it
1115 <literal>Show t</literal> and
1116 <literal>Eq t</literal> constraints.
1117 </para>
1118 </listitem>
1119 </itemizedlist>
1120 </para>
1121 </listitem>
1122
1123 <listitem>
1124 <para>
1125 Many modules have been given Safe Haskell
1126 <literal>Safe</literal>, <literal>Unsafe</literal> or
1127 <literal>Trustworthy</literal> annotations.
1128 </para>
1129 </listitem>
1130 </itemizedlist>
1131
1132 <sect3>
1133 <title>array</title>
1134 <itemizedlist>
1135 <listitem>
1136 <para>
1137 Version number 0.4.0.0 (was 0.3.0.3)
1138 </para>
1139 </listitem>
1140
1141 <listitem>
1142 <para>
1143 There are new modules
1144 <literal>Data.Array.IO.Safe</literal>,
1145 <literal>Data.Array.MArray.Safe</literal>,
1146 <literal>Data.Array.ST.Safe</literal> and
1147 <literal>Data.Array.Storable.Safe</literal>
1148 containing just the safe (in the Safe Haskell sense
1149 of the term) parts of their respective APIs, and
1150 <literal>Data.Array.Unsafe</literal> containing
1151 the unsafe parts of the
1152 <literal>Data.Array</literal> API.
1153 </para>
1154 </listitem>
1155
1156 <listitem>
1157 <para>
1158 There is a new module
1159 <literal>Data.Array.Storable.Internals</literal>
1160 which exports some internal functions for the
1161 <literal>Data.Array.Storable</literal> API.
1162 </para>
1163 </listitem>
1164
1165 <listitem>
1166 <para>
1167 <literal>Data.Array.IO.castIOUArray</literal>
1168 is now deprecated; use
1169 <literal>Data.Array.Unsafe.castIOUArray</literal>
1170 instead.
1171 </para>
1172 </listitem>
1173
1174 <listitem>
1175 <para>
1176 <literal>Data.Array.ST.castSTUArray</literal>
1177 is now deprecated; use
1178 <literal>Data.Array.Unsafe.castSTUArray</literal>
1179 instead.
1180 </para>
1181 </listitem>
1182
1183 <listitem>
1184 <para>
1185 <literal>Data.Array.MArray.unsafeFreeze</literal>
1186 and <literal>Data.Array.MArray.unsafeThaw</literal>
1187 are now deprecated; use
1188 <literal>Data.Array.Unsafe.unsafeFreeze</literal>
1189 and <literal>Data.Array.Unsafe.unsafeThaw</literal>
1190 instead.
1191 </para>
1192 </listitem>
1193
1194 <listitem>
1195 <para>
1196 <literal>Data.Array.Storable.unsafeForeignPtrToStorableArray</literal>
1197 is now deprecated; use
1198 <literal>Data.Array.Unsafe.unsafeForeignPtrToStorableArray</literal>
1199 instead.
1200 </para>
1201 </listitem>
1202 </itemizedlist>
1203 </sect3>
1204
1205 <sect3>
1206 <title>base</title>
1207 <itemizedlist>
1208 <listitem>
1209 <para>
1210 Version number 4.5.0.0 (was 4.4.1.0)
1211 </para>
1212 </listitem>
1213
1214 <listitem>
1215 <para>
1216 <literal>Data.Monoid</literal> now exports
1217 <literal>&lt;&gt;</literal> as an infix synonym for
1218 <literal>mappend</literal> It associates to the
1219 right, and has precedence 6.
1220 </para>
1221 </listitem>
1222
1223 <listitem>
1224 <para>
1225 <literal>Data.List</literal> has a new function
1226 <literal>dropWhileEnd</literal>, which is similar to
1227 <literal>dropWhile</literal> except it removes the
1228 suffix of characters matching the predicate, rather
1229 than the prefix of characters.
1230 </para>
1231 </listitem>
1232
1233 <listitem>
1234 <para>
1235 The <literal>Data.Bits.Bits</literal>
1236 class has two new methods
1237 <literal>unsafeShiftL</literal> and
1238 <literal>unsafeShiftR</literal> which perform shifts
1239 on the assumption that the amount to be shifted by
1240 is positive.
1241 </para>
1242 </listitem>
1243
1244 <listitem>
1245 <para>
1246 The <literal>Data.Bits.Bits</literal>
1247 class has a new method <literal>popCount</literal>
1248 which returns the number of bits that are set in the
1249 value.
1250 </para>
1251 </listitem>
1252
1253 <listitem>
1254 <para>
1255 The <literal>C*</literal> types exported by
1256 <literal>Foreign.C.Types</literal> and
1257 <literal>System.Posix.Types</literal> are now
1258 exported non-abstractly, as the FFI now requires
1259 that the constructors for newtypes are visible.
1260 </para>
1261 </listitem>
1262
1263 <listitem>
1264 <para>
1265 In <literal>Data.Typeable</literal>,
1266 <literal>tyConString</literal> is now deprecated,
1267 in favour of the new
1268 <literal>tyConPackage</literal>,
1269 <literal>tyConModule</literal> and
1270 <literal>tyConName</literal> functions.
1271 </para>
1272 </listitem>
1273
1274 <listitem>
1275 <para>
1276 <literal>GHC.Exts.traceEvent</literal>
1277 is now deprecated. You should use the new
1278 <literal>Debug.Trace.traceEventIO</literal>
1279 instead. There is also a new function
1280 <literal>Debug.Trace.traceEvent</literal> that is
1281 analogous to <literal>Debug.Trace.trace</literal>.
1282 </para>
1283 </listitem>
1284
1285 <listitem>
1286 <para>
1287 <literal>Debug.Trace.putTraceMsg</literal>
1288 is now deprecated in favour of the new function
1289 <literal>Debug.Trace.traceIO</literal>.
1290 </para>
1291 </listitem>
1292
1293 <listitem>
1294 <para>
1295 When a program is compiled with
1296 <literal>-prof</literal>, GHC's run-time system now
1297 makes a stack trace (based on the SCCs defined)
1298 available to the program.
1299 </para>
1300 <para>
1301 There is a new function
1302 <literal>GHC.Exts.currentCallStack</literal> which
1303 returns the stack trace as a list of
1304 <literal>String</literal>s.
1305 </para>
1306 <para>
1307 There is also a new function
1308 <literal>Debug.Trace.traceStack</literal> which is
1309 like <literal>Debug.Trace.trace</literal> but also
1310 prints a call stack trace if one is available.
1311 </para>
1312 </listitem>
1313
1314 <listitem>
1315 <para>
1316 <literal>GHC.Conc</literal> has a new function,
1317 <literal>getNumProcessors</literal>, which returns
1318 the number of CPUs that the machine has.
1319 </para>
1320 </listitem>
1321
1322 <listitem>
1323 <para>
1324 <literal>GHC.Conc</literal> has a new function,
1325 <literal>setNumCapabilities</literal>, which sets
1326 the number of Haskell threads which can run
1327 simultaneously. Currently GHC only allows increasing
1328 the number of running threads.
1329 </para>
1330 </listitem>
1331
1332 <listitem>
1333 <para>
1334 The encodings used for the filesystem, for foreign
1335 calls, and for the locale, are now mutable.
1336 In order to alter them you need to use
1337 <literal>setLocaleEncoding</literal>,
1338 <literal>setFileSystemEncoding</literal> and
1339 <literal>setForeignEncoding</literal> from
1340 <literal>GHC.IO.Encoding</literal>.
1341 </para>
1342 </listitem>
1343
1344 <listitem>
1345 <para>
1346 Assertions are now better behaved; if an assertion
1347 fails then you will get an assertion error, rather
1348 than another <literal>_|_</literal> result from the
1349 expression that the assertion guards.
1350 </para>
1351 </listitem>
1352
1353 <listitem>
1354 <para>
1355 A bug in the behaviour of
1356 <literal>scaleFloat</literal> on
1357 <literal>Float</literal> and
1358 <literal>Double</literal> when used with non-finite
1359 values has been fixed.
1360 </para>
1361 </listitem>
1362
1363 <listitem>
1364 <para>
1365 A bug which meant that
1366 <literal>System.IO.fixIO</literal> was not
1367 threadsafe has been fixed.
1368 </para>
1369 <para>
1370 There is also now a new
1371 <literal>System.IO.Unsafe.unsafeFixIO</literal> that
1372 may be more efficient, but is not guaranteed to be
1373 threadsafe.
1374 </para>
1375 </listitem>
1376
1377 <listitem>
1378 <para>
1379 There is a new module <literal>GHC.Stats</literal>
1380 which exports a function
1381 <literal>getGCStats</literal> which gives some info
1382 from the runtime system using the
1383 <literal>GCStats</literal> type.
1384 </para>
1385 </listitem>
1386
1387 <listitem>
1388 <para>
1389 There is a new type
1390 <literal>GHC.Exts.Constraint</literal> which
1391 is used with the <literal>ConstraintKind</literal>
1392 extension.
1393 </para>
1394 </listitem>
1395
1396 <listitem>
1397 <para>
1398 The <literal>Control.Monad.Group</literal> module,
1399 and the <literal>MonadGroup</literal> class that it
1400 defined, have been removed.
1401 </para>
1402 </listitem>
1403
1404 <listitem>
1405 <para>
1406 Support for platforms where word size is less than
1407 32bits has been removed.
1408 </para>
1409 </listitem>
1410 </itemizedlist>
1411 </sect3>
1412
1413 <sect3>
1414 <title>bin-package-db</title>
1415 <itemizedlist>
1416 <listitem>
1417 <para>
1418 This is an internal package, and should not be used.
1419 </para>
1420 </listitem>
1421 </itemizedlist>
1422 </sect3>
1423
1424 <sect3>
1425 <title>binary</title>
1426 <itemizedlist>
1427 <listitem>
1428 <para>
1429 Version number 0.5.0.3 (was 0.5.0.2)
1430 It is now exposed by default.
1431 </para>
1432 </listitem>
1433 </itemizedlist>
1434 </sect3>
1435
1436 <sect3>
1437 <title>bytestring</title>
1438 <itemizedlist>
1439 <listitem>
1440 <para>
1441 Version number 0.9.2.1 (was 0.9.2.0)
1442 </para>
1443 </listitem>
1444 </itemizedlist>
1445 </sect3>
1446
1447 <sect3>
1448 <title>Cabal</title>
1449 <itemizedlist>
1450 <listitem>
1451 <para>
1452 Version number 1.14.0.0 (was 1.12.0.0)
1453 </para>
1454 </listitem>
1455
1456 <listitem>
1457 <para>
1458 For details of the changes to the Cabal library,
1459 plese see the Cabal changelog.
1460 </para>
1461 </listitem>
1462 </itemizedlist>
1463 </sect3>
1464
1465 <sect3>
1466 <title>containers</title>
1467 <itemizedlist>
1468 <listitem>
1469 <para>
1470 Version number 0.4.2.1 (was 0.4.1.0)
1471 </para>
1472 </listitem>
1473
1474 <listitem>
1475 <para>
1476 <literal>Data.Map</literal>
1477 now exports
1478 <literal>foldr</literal>,
1479 <literal>foldr'</literal>,
1480 <literal>foldl</literal> and
1481 <literal>foldl'</literal>.
1482 </para>
1483 </listitem>
1484
1485 <listitem>
1486 <para>
1487 <literal>Data.Set</literal>
1488 now exports
1489 <literal>foldr</literal>,
1490 <literal>foldr'</literal>,
1491 <literal>foldl</literal> and
1492 <literal>foldl'</literal>.
1493 </para>
1494 </listitem>
1495
1496 <listitem>
1497 <para>
1498 <literal>Data.IntMap</literal>
1499 now exports
1500 <literal>foldr</literal>,
1501 <literal>foldr'</literal>,
1502 <literal>foldl</literal>,
1503 <literal>foldl'</literal>,
1504 <literal>foldrWithKey</literal>,
1505 <literal>foldrWithKey'</literal>,
1506 <literal>foldlWithKey</literal> and
1507 <literal>foldlWithKey'</literal>.
1508 </para>
1509 </listitem>
1510
1511 <listitem>
1512 <para>
1513 <literal>Data.IntSet</literal>
1514 now exports
1515 <literal>foldr</literal>,
1516 <literal>foldr'</literal>,
1517 <literal>foldl</literal> and
1518 <literal>foldl'</literal>.
1519 </para>
1520 </listitem>
1521
1522 <listitem>
1523 <para>
1524 <literal>Data.Map.foldWithKey</literal> is no
1525 longer deprecated, although it is expected to
1526 be deprecated again in the future.
1527 </para>
1528 </listitem>
1529
1530 <listitem>
1531 <para>
1532 There are now
1533 <literal>NFData</literal>
1534 instance for
1535 <literal>Data.Map.Map</literal>,
1536 <literal>Data.Set.Set</literal>,
1537 <literal>Data.IntMap.IntMap</literal>,
1538 <literal>Data.IntSet.IntSet</literal> and
1539 <literal>Data.Tree.Tree</literal>.
1540 </para>
1541 </listitem>
1542 </itemizedlist>
1543 </sect3>
1544
1545 <sect3>
1546 <title>deepseq</title>
1547 <itemizedlist>
1548 <listitem>
1549 <para>
1550 New package, version 1.3.0.0.
1551 </para>
1552 </listitem>
1553 </itemizedlist>
1554 </sect3>
1555
1556 <sect3>
1557 <title>directory</title>
1558 <itemizedlist>
1559 <listitem>
1560 <para>
1561 Version number 1.1.0.2 (was 1.1.0.1)
1562 </para>
1563 </listitem>
1564 </itemizedlist>
1565 </sect3>
1566
1567 <sect3>
1568 <title>extensible-exceptions</title>
1569 <itemizedlist>
1570 <listitem>
1571 <para>
1572 Version number 0.1.1.4 (was 0.1.1.3)
1573 </para>
1574 </listitem>
1575 </itemizedlist>
1576 </sect3>
1577
1578 <sect3>
1579 <title>filepath</title>
1580 <itemizedlist>
1581 <listitem>
1582 <para>
1583 Version number 1.3.0.0 (was 1.2.0.1)
1584 </para>
1585 </listitem>
1586
1587 <listitem>
1588 <para>
1589 A bug, which caused
1590 <literal>normalise "/"</literal> to return
1591 <literal>"/."</literal> rather than
1592 <literal>"/"</literal>, has been fixed.
1593 </para>
1594 </listitem>
1595 </itemizedlist>
1596 </sect3>
1597
1598 <sect3>
1599 <title>ghc-prim</title>
1600 <itemizedlist>
1601 <listitem>
1602 <para>
1603 This is an internal package, and should not be used.
1604 </para>
1605 </listitem>
1606 </itemizedlist>
1607 </sect3>
1608
1609 <sect3>
1610 <title>haskell98</title>
1611 <itemizedlist>
1612 <listitem>
1613 <para>
1614 Version number 2.0.0.1 (was 2.0.0.0)
1615 </para>
1616 </listitem>
1617 </itemizedlist>
1618 </sect3>
1619
1620 <sect3>
1621 <title>haskell2010</title>
1622 <itemizedlist>
1623 <listitem>
1624 <para>
1625 Version number 1.1.0.1 (was 1.1.0.0)
1626 </para>
1627 </listitem>
1628 </itemizedlist>
1629 </sect3>
1630
1631 <sect3>
1632 <title>hoopl</title>
1633 <itemizedlist>
1634 <listitem>
1635 <para>
1636 Version number 3.8.7.3 (was 3.8.7.2)
1637 </para>
1638 </listitem>
1639
1640 <listitem>
1641 <para>
1642 A new <literal>liftFuel</literal> method has been
1643 added to
1644 <literal>Compiler.Hoopl.Fuel.FuelMonadT</literal>.
1645 </para>
1646 </listitem>
1647 </itemizedlist>
1648 </sect3>
1649
1650 <sect3>
1651 <title>hpc</title>
1652 <itemizedlist>
1653 <listitem>
1654 <para>
1655 Version number 0.5.1.1 (was 0.5.1.0)
1656 </para>
1657 </listitem>
1658 </itemizedlist>
1659 </sect3>
1660
1661 <sect3>
1662 <title>integer-gmp</title>
1663 <itemizedlist>
1664 <listitem>
1665 <para>
1666 Version number 0.4.0.0 (was 0.3.0.0)
1667 </para>
1668 </listitem>
1669
1670 <listitem>
1671 <para>
1672 There is a new module
1673 <literal>GHC.Integer.GMP.Prim</literal>
1674 that exports the Haskell imports of the GMP
1675 functions. They are no longer exported by
1676 <literal>GHC.Integer.GMP.Internals</literal>.
1677 </para>
1678 </listitem>
1679
1680 <listitem>
1681 <para>
1682 <literal>GHC.Integer.GMP.Internals</literal>
1683 now exports <literal>gcdInteger</literal> and
1684 <literal>lcmInteger</literal>. They are no longer
1685 exported by <literal>GHC.Integer</literal>.
1686 </para>
1687 </listitem>
1688
1689 <listitem>
1690 <para>
1691 There is a new function <literal>mkInteger</literal>
1692 exported from <literal>GHC.Integer.Type</literal>
1693 and <literal>GHC.Integer</literal>. It constructs an
1694 <literal>Integer</literal> from a
1695 <literal>Bool</literal> (indicating the sign) and a
1696 list of <literal>Int</literal>s (which provide the
1697 value, in 31-bit chunks, least-significant first).
1698 </para>
1699 </listitem>
1700 </itemizedlist>
1701 </sect3>
1702
1703 <sect3>
1704 <title>old-locale</title>
1705 <itemizedlist>
1706 <listitem>
1707 <para>
1708 Version number 1.0.0.4 (was 1.0.0.3)
1709 </para>
1710 </listitem>
1711 </itemizedlist>
1712 </sect3>
1713
1714 <sect3>
1715 <title>old-time</title>
1716 <itemizedlist>
1717 <listitem>
1718 <para>
1719 Version number 1.1.0.0 (was 1.0.0.7)
1720 </para>
1721 </listitem>
1722
1723 <listitem>
1724 <para>
1725 A bug which caused
1726 <literal>System.Time.formatCalendarTime</literal>
1727 to show a value 1 too low for the
1728 <literal>%j</literal> format specifier has been fixed.
1729 </para>
1730 </listitem>
1731 </itemizedlist>
1732 </sect3>
1733
1734 <sect3>
1735 <title>pretty</title>
1736 <itemizedlist>
1737 <listitem>
1738 <para>
1739 Version number 1.1.1.0 (was 1.1.0.0)
1740 </para>
1741 </listitem>
1742
1743 <listitem>
1744 <para>
1745 The recommended module is now
1746 <literal>Text.PrettyPrint</literal> rather than
1747 <literal>Text.PrettyPrint.HughesPJ</literal>.
1748 </para>
1749 </listitem>
1750
1751 <listitem>
1752 <para>
1753 Both modules now export <literal>first</literal>,
1754 which takes two documents and returns the first
1755 provided it is non-empty, and the second otherwise.
1756 </para>
1757 </listitem>
1758
1759 <listitem>
1760 <para>
1761 Both modules now export
1762 <literal>reduceDoc</literal>.
1763 </para>
1764 </listitem>
1765 </itemizedlist>
1766 </sect3>
1767
1768 <sect3>
1769 <title>process</title>
1770 <itemizedlist>
1771 <listitem>
1772 <para>
1773 Version number 1.1.0.1 (was 1.1.0.0)
1774 </para>
1775 </listitem>
1776 </itemizedlist>
1777 </sect3>
1778
1779 <sect3>
1780 <title>template-haskell</title>
1781 <itemizedlist>
1782 <listitem>
1783 <para>
1784 Version number 2.7.0.0 (was 2.6.0.0)
1785 </para>
1786 </listitem>
1787
1788 <listitem>
1789 <para>
1790 The
1791 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1792 class now has a <literal>qAddDependentFile</literal>
1793 method, which splices can use to indicate that the
1794 result of the splice depends upon the contents of
1795 a file. This tells the compiler that if the file
1796 has changed then it will need to recompile the
1797 module containing the splice.
1798 </para>
1799 <para>
1800 There is also a new helper function
1801 <literal>addDependentFile</literal> in
1802 <literal>Language.Haskell.TH.Syntax</literal>.
1803 </para>
1804 </listitem>
1805
1806 <listitem>
1807 <para>
1808 The
1809 <literal>Language.Haskell.TH.Syntax.Exp</literal>
1810 type now has <literal>UInfixE</literal> and
1811 <literal>ParensE</literal> constructors, and
1812 <literal>Language.Haskell.TH.Syntax.Pat</literal>
1813 gains corresponding <literal>UInfixP</literal>
1814 and <literal>ParensP</literal> constructors.
1815 </para>
1816 <para>
1817 There are corresponding helper functions
1818 <literal>uInfixE</literal>,
1819 <literal>parensE</literal>,
1820 <literal>uInfixP</literal> and
1821 <literal>parensP</literal> defined in
1822 <literal>Language.Haskell.TH.Lib</literal>
1823 and re-exported by
1824 <literal>Language.Haskell.TH</literal>.
1825 </para>
1826 <para>
1827 These constructors are used for infix expressions
1828 where the fixities of the operators are not known.
1829 The compiler will look up the fixities and
1830 reassociate the expression as necessary.
1831 </para>
1832 <para>
1833 There is also a new value
1834 <literal>Language.Haskell.TH.Ppr.unopPrec</literal>
1835 used when pretty-printing expressions of unknown
1836 fixity.
1837 </para>
1838 </listitem>
1839
1840 <listitem>
1841 <para>
1842 The
1843 <literal>Language.Haskell.TH.Syntax.Strict</literal>
1844 type now has an <literal>Unpacked</literal>
1845 constructor, which corresponds to the
1846 <literal>{-# UNPACK #-}</literal> pragma.
1847 There is a corresponding helper function
1848 <literal>Language.Haskell.TH.Lib.unpacked</literal>.
1849 </para>
1850 </listitem>
1851
1852 <listitem>
1853 <para>
1854 The
1855 <literal>Language.Haskell.TH.Syntax.Info</literal>
1856 type has a new constructor
1857 <literal>FamilyI</literal>, used when reifying a
1858 data or type family's name.
1859 </para>
1860 </listitem>
1861
1862 <listitem>
1863 <para>
1864 The
1865 <literal>Language.Haskell.TH.Syntax.ClassInstance</literal>
1866 type has been removed, and the
1867 <literal>ClassI</literal> constructor of
1868 <literal>Language.Haskell.TH.Syntax.Info</literal>
1869 now contains <literal>[InstanceDec]</literal>
1870 rather than <literal>[ClassInstance]</literal>.
1871 </para>
1872 <para>
1873 <literal>Language.Haskell.TH.Syntax.InstanceDec</literal>
1874 is a new type synonym of
1875 <literal>Language.Haskell.TH.Syntax.Dec</literal>,
1876 but its constructor is guaranteed to be one of
1877 <literal>InstanceD</literal> (with empty
1878 <literal>[Dec]</literal>),
1879 <literal>DataInstD</literal> or
1880 <literal>NewtypeInstD</literal> (with empty derived
1881 <literal>[Name]</literal>), or
1882 <literal>TySynInstD</literal>.
1883 </para>
1884 <para>
1885 The <literal>qClassInstances</literal> method of the
1886 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1887 class has been replaced with a
1888 <literal>qReifyInstances</literal> method.
1889 </para>
1890 <para>
1891 Likewise, in
1892 <literal>Language.Haskell.TH.Syntax</literal>, the
1893 <literal>isClassInstance</literal> and
1894 <literal>classInstances</literal> functions have
1895 been replaced by <literal>isInstance</literal> and
1896 <literal>reifyInstances</literal>. They are also
1897 re-exported by
1898 <literal>Language.Haskell.TH</literal>.
1899 </para>
1900 </listitem>
1901
1902 <listitem>
1903 <para>
1904 The
1905 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1906 class now has a <literal>qLookupName</literal>
1907 method, which takes a
1908 <literal>Bool</literal>
1909 indictaing whether you are looking for a type or a
1910 value, and a
1911 <literal>String</literal>.
1912 It then tries to look up the name, returning a
1913 <literal>Maybe Name</literal> in the monad.
1914 </para>
1915 <para>
1916 There are also new helper functions
1917 <literal>lookupTypeName</literal> and
1918 <literal>lookupValueName</literal>, which are also
1919 re-exported by
1920 <literal>Language.Haskell.TH</literal>.
1921 </para>
1922 </listitem>
1923
1924 <listitem>
1925 <para>
1926 The
1927 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1928 class now has an <literal>Applicative</literal>
1929 superclass, rather than a <literal>Functor</literal>
1930 superclass. There is also now an
1931 <literal>Applicative</literal> instance for
1932 <literal>Language.Haskell.TH.Syntax.Q</literal>.
1933 </para>
1934 </listitem>
1935
1936 <listitem>
1937 <para>
1938 The <literal>NameSpace</literal> type is now
1939 abstractly re-exported by
1940 <literal>Language.Haskell.TH</literal>.
1941 </para>
1942 </listitem>
1943 </itemizedlist>
1944 </sect3>
1945
1946 <sect3>
1947 <title>time</title>
1948 <itemizedlist>
1949 <listitem>
1950 <para>
1951 Version number 1.4 (was 1.2.0.5)
1952 </para>
1953 </listitem>
1954
1955 <listitem>
1956 <para>
1957 A <literal>RealFrac</literal>
1958 instance has been added for
1959 <literal>Data.Time.Clock.Scale.DiffTime</literal>.
1960 </para>
1961 </listitem>
1962
1963 <listitem>
1964 <para>
1965 <literal>NFData</literal>
1966 instances have been added for
1967 <literal>Data.Time.Calendar.Days.Day</literal>,
1968 <literal>Data.Time.Clock.Scale.UniversalTime</literal>,
1969 <literal>Data.Time.Clock.Scale.DiffTime</literal>,
1970 <literal>Data.Time.Clock.TAI.AbsoluteTime</literal>,
1971 <literal>Data.Time.Clock.UTC.UTCTime</literal>,
1972 <literal>Data.Time.Clock.UTC.NominalDiffTime</literal>,
1973 <literal>Data.Time.LocalTime.LocalTime.LocalTime</literal>,
1974 <literal>Data.Time.LocalTime.LocalTime.ZonedTime</literal>,
1975 <literal>Data.Time.LocalTime.TimeOfDay.TimeOfDay</literal>
1976 and
1977 <literal>Data.Time.LocalTime.TimeZone.TimeZone</literal>.
1978 </para>
1979 </listitem>
1980 </itemizedlist>
1981 </sect3>
1982
1983 <sect3>
1984 <title>unix</title>
1985 <itemizedlist>
1986 <listitem>
1987 <para>
1988 Version number 2.5.1.0 (was 2.5.0.0)
1989 </para>
1990 </listitem>
1991
1992 <listitem>
1993 <para>
1994 <literal>System.Posix</literal> now re-exports
1995 <literal>System.Posix.DynamicLinker</literal>
1996 (although it hides the <literal>Default</literal>
1997 constructor, as that clashes with the constructor
1998 of the same name of the
1999 <literal>System.Posix.Signals.Handler</literal>
2000 type).
2001 </para>
2002 </listitem>
2003
2004 <listitem>
2005 <para>
2006 There is now a raw bytestring version of the
2007 filepath and environment APIs. It uses a
2008 <literal>RawFilePath = ByteString</literal>
2009 type synonym, and adds a number of new exposed
2010 modules:
2011 <literal>System.Posix.ByteString</literal>,
2012 <literal>System.Posix.ByteString.FilePath</literal>,
2013 <literal>System.Posix.Directory.ByteString</literal>,
2014 <literal>System.Posix.DynamicLinker.Module.ByteString</literal>,
2015 <literal>System.Posix.DynamicLinker.ByteString</literal>,
2016 <literal>System.Posix.Files.ByteString</literal>,
2017 <literal>System.Posix.IO.ByteString</literal>,
2018 <literal>System.Posix.Env.ByteString</literal>,
2019 <literal>System.Posix.Process.ByteString</literal>,
2020 <literal>System.Posix.Temp.ByteString</literal> and
2021 <literal>System.Posix.Terminal.ByteString</literal>.
2022 </para>
2023 </listitem>
2024 </itemizedlist>
2025 </sect3>
2026
2027 <sect3>
2028 <title>Win32</title>
2029 <itemizedlist>
2030 <listitem>
2031 <para>
2032 Version number 2.2.2.0 (was 2.2.1.0)
2033 </para>
2034 </listitem>
2035
2036 <listitem>
2037 <para>
2038 <literal>System.Win32.File</literal> now exports
2039 <literal>failIfWithRetry</literal>,
2040 <literal>failIfWithRetry_</literal> and
2041 <literal>failIfFalseWithRetry_</literal>.
2042 </para>
2043 </listitem>
2044 </itemizedlist>
2045 </sect3>
2046 </sect2>
2047 </sect1>
2048