89d1ae847ad6a2e1a263b1f00594ada0b4821a48
[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 TODO:
892 #define EVENT_SPARK_COUNTERS 34 /* (crt,dud,ovf,cnv,fiz,gcd,rem) */
893 #define EVENT_SPARK_CREATE 35 /* () */
894 #define EVENT_SPARK_DUD 36 /* () */
895 #define EVENT_SPARK_OVERFLOW 37 /* () */
896 #define EVENT_SPARK_RUN 38 /* () */
897 #define EVENT_SPARK_STEAL 39 /* (victim_cap) */
898 #define EVENT_SPARK_FIZZLE 40 /* () */
899 #define EVENT_SPARK_GC 41 /* () */
900 #define EVENT_INTERN_STRING 42 /* (string, id) {not used by ghc} */
901
902 TODO
903 d77df1caad3a5f833aac9275938a0675e1ee6aac
904 A new eventlog event containing 7 spark counters/statistics: sparks
905 created, dud, overflowed, converted, GC'd, fizzled and remaining.
906 These are maintained and logged separately for each capability.
907 We log them at startup, on each GC (minor and major) and on shutdown.
908
909 a5192d48e61a8ece69cddc43cc12625fcdcc56ec
910 add a new trace class for spark events
911
912 46b70749971341678c3e4d5cdb2b1ab1a13d039e
913 Move GC tracing into a separate trace class
914
915 Previously GC was included in the scheduler trace class. It can be
916 enabled specifically with +RTS -vg or -lg, though note that both -v
917 and -l on their own now default to a sensible set of trace classes,
918 currently: scheduler, gc and sparks.
919
920 084b64f22717b203b8d8c2ab7c057fb747e39593
921 Add new fully-accurate per-spark trace/eventlog events
922
923 Replaces the existing EVENT_RUN/STEAL_SPARK events with 7 new events
924 covering all stages of the spark lifcycle:
925 create, dud, overflow, run, steal, fizzle, gc
926
927 The sampled spark events are still available. There are now two event
928 classes for sparks, the sampled and the fully accurate. They can be
929 enabled/disabled independently. By default +RTS -l includes the sampled
930 but not full detail spark events. Use +RTS -lf-p to enable the detailed
931 'f' and disable the sampled 'p' spark.
932
933 b0935476b64b4818e4b5653c756c648623753fd3
934 Document the new +RTS -l flags in the +RTS --help output
935
936 8f4f29f655fdda443861152a24588fcaba29b168
937 Document the new +RTS -l options in the user guide
938 </para>
939 </listitem>
940
941 <listitem>
942 <para>
943 There is a new eventlog event
944 <literal>EVENT_WALL_CLOCK_TIME</literal>
945 which is used for matching the time of events
946 between different processes.
947 </para>
948 </listitem>
949
950 <listitem>
951 <para>
952 There is a new eventlog event
953 <literal>EVENT_THREAD_LABEL</literal>
954 which is emitted by the existing
955 <literal>GHC.Conc.labelThread</literal>
956 function. This allows tools such as
957 ThreadScope to use thread labels rather
958 than thread numbers.
959 </para>
960 </listitem>
961
962 <listitem>
963 <para>
964 TODO
965 From aaaaf67b2fca9bd9b0027c983bfc9f9255b2bce5 Mon Sep 17 00:00:00 2001
966 Subject: [PATCH 0695/1074] Add an RTS eventlog tracing class for user messages
967 </para>
968 </listitem>
969
970 <listitem>
971 <para>
972 On Windows, if the program name ends in
973 <literal>.exe</literal> then the
974 <literal>.exe</literal> is removed when making
975 the eventlog filename.
976 </para>
977 </listitem>
978 </itemizedlist>
979 </sect3>
980
981 <sect3>
982 <title>Runtime system</title>
983 <itemizedlist>
984 <listitem>
985 <para>
986 The restrictions on what
987 <literal>+RTS</literal>
988 flags are available by default has changed.
989 By default, you can now use the
990 <literal>-t</literal>,
991 <literal>-T</literal>,
992 <literal>-s</literal> and
993 <literal>-S</literal> RTS flags, provided you do not
994 give them a filename argument.
995 </para>
996
997 <para>
998 Additionally, when linking with
999 <literal>-threaded</literal>, you can now use the
1000 <literal>+RTS -N</literal> flag without having
1001 to link with <literal>-rtsopts</literal>.
1002 Also, when linking with "developer" ways
1003 (<literal>-debug</literal>,
1004 <literal>-eventlog</literal> and
1005 <literal>-prof</literal>) all the way-specific flags
1006 are allowed; for example,
1007 <literal>+RTS -h</literal> is allowed when linking
1008 with <literal>-prof</literal>.
1009 </para>
1010 </listitem>
1011
1012 <listitem>
1013 <para>
1014 There is a new RTS flag
1015 <literal>-T</literal>, which makes the RTS collect
1016 statistics (memory usage, etc) but not give any
1017 output. The new <literal>GHC.Stats</literal>
1018 module in the <literal>base</literal> package
1019 provides access to this data.
1020 </para>
1021 </listitem>
1022
1023 <listitem>
1024 <para>
1025 You can now give the RTS flag
1026 <literal>-H</literal>
1027 (without an argument) and the runtime system
1028 will infer a sensible value to use. See
1029 <xref linkend="rts-options-gc" /> for more details.
1030 </para>
1031 </listitem>
1032
1033 <listitem>
1034 <para>
1035 When using <literal>-no-hs-main</literal>
1036 and starting the runtime system yourself,
1037 if you wish to pass RTS flags then you will now
1038 need to use the new <literal>hs_init_ghc</literal>
1039 function. See <xref linkend="using-own-main" />
1040 for details.
1041 </para>
1042 </listitem>
1043
1044 <listitem>
1045 <para>
1046 The runtime system now supports using
1047 <literal>forkProcess</literal>
1048 when running with multiple capabilities
1049 (<literal>+RTS -N</literal>).
1050 </para>
1051 </listitem>
1052 </itemizedlist>
1053 </sect3>
1054
1055 <sect3>
1056 <title>Build system</title>
1057 <itemizedlist>
1058 <listitem>
1059 <para>
1060 You can now build GHC with Alex 3.0.
1061 </para>
1062 </listitem>
1063
1064 <listitem>
1065 <para>
1066 TODO
1067 On OS X, with XCode >= 4.2, GHC will use
1068 gcc-4.2 rather than gcc.
1069 </para>
1070 </listitem>
1071
1072 <listitem>
1073 <para>
1074 There is now preliminary support for registerised
1075 compilation on the ARM platform, using LLVM.
1076 </para>
1077 </listitem>
1078
1079 <listitem>
1080 <para>
1081 Dynamic libraries are now supported on OSX x86_64.
1082 </para>
1083 </listitem>
1084
1085 <listitem>
1086 <para>
1087 GHCi is now supported on kfreebsdgnu platforms.
1088 </para>
1089 </listitem>
1090
1091 <listitem>
1092 <para>
1093 GHC now recognises the s390x architecture.
1094 </para>
1095 </listitem>
1096 </itemizedlist>
1097 </sect3>
1098 </sect2>
1099
1100 <sect2>
1101 <title>Libraries</title>
1102
1103 <para>
1104 There have been some changes that have effected multiple
1105 libraries:
1106 </para>
1107
1108 <itemizedlist>
1109 <listitem>
1110 <para>
1111 The <literal>Num</literal> class no longer has
1112 <literal>Eq</literal> or <literal>Show</literal>
1113 superclasses. A number of other classes and
1114 functions have therefore gained explicit
1115 <literal>Eq</literal> or <literal>Show</literal>
1116 constraints, rather than relying on a
1117 <literal>Num</literal> constraint to provide them.
1118 </para>
1119
1120 <para>
1121 You can make code that works with both
1122 Haskell98/Haskell2010 and GHC by:
1123 <itemizedlist>
1124 <listitem>
1125 <para>
1126 Whenever you make a <literal>Num</literal> instance
1127 of a type, also make <literal>Show</literal> and
1128 <literal>Eq</literal> instances, and
1129 </para>
1130 </listitem>
1131 <listitem>
1132 <para>
1133 Whenever you give a function, instance or class a
1134 <literal>Num t</literal> constraint, also give it
1135 <literal>Show t</literal> and
1136 <literal>Eq t</literal> constraints.
1137 </para>
1138 </listitem>
1139 </itemizedlist>
1140 </para>
1141 </listitem>
1142
1143 <listitem>
1144 <para>
1145 Many modules have been given Safe Haskell
1146 <literal>Safe</literal>, <literal>Unsafe</literal> or
1147 <literal>Trustworthy</literal> annotations.
1148 </para>
1149 </listitem>
1150 </itemizedlist>
1151
1152 <sect3>
1153 <title>array</title>
1154 <itemizedlist>
1155 <listitem>
1156 <para>
1157 Version number 0.4.0.0 (was 0.3.0.3)
1158 </para>
1159 </listitem>
1160
1161 <listitem>
1162 <para>
1163 There are new modules
1164 <literal>Data.Array.IO.Safe</literal>,
1165 <literal>Data.Array.MArray.Safe</literal>,
1166 <literal>Data.Array.ST.Safe</literal> and
1167 <literal>Data.Array.Storable.Safe</literal>
1168 containing just the safe (in the Safe Haskell sense
1169 of the term) parts of their respective APIs, and
1170 <literal>Data.Array.Unsafe</literal> containing
1171 the unsafe parts of the
1172 <literal>Data.Array</literal> API.
1173 </para>
1174 </listitem>
1175
1176 <listitem>
1177 <para>
1178 There is a new module
1179 <literal>Data.Array.Storable.Internals</literal>
1180 which exports some internal functions for the
1181 <literal>Data.Array.Storable</literal> API.
1182 </para>
1183 </listitem>
1184
1185 <listitem>
1186 <para>
1187 <literal>Data.Array.IO.castIOUArray</literal>
1188 is now deprecated; use
1189 <literal>Data.Array.Unsafe.castIOUArray</literal>
1190 instead.
1191 </para>
1192 </listitem>
1193
1194 <listitem>
1195 <para>
1196 <literal>Data.Array.ST.castSTUArray</literal>
1197 is now deprecated; use
1198 <literal>Data.Array.Unsafe.castSTUArray</literal>
1199 instead.
1200 </para>
1201 </listitem>
1202
1203 <listitem>
1204 <para>
1205 <literal>Data.Array.MArray.unsafeFreeze</literal>
1206 and <literal>Data.Array.MArray.unsafeThaw</literal>
1207 are now deprecated; use
1208 <literal>Data.Array.Unsafe.unsafeFreeze</literal>
1209 and <literal>Data.Array.Unsafe.unsafeThaw</literal>
1210 instead.
1211 </para>
1212 </listitem>
1213
1214 <listitem>
1215 <para>
1216 <literal>Data.Array.Storable.unsafeForeignPtrToStorableArray</literal>
1217 is now deprecated; use
1218 <literal>Data.Array.Unsafe.unsafeForeignPtrToStorableArray</literal>
1219 instead.
1220 </para>
1221 </listitem>
1222 </itemizedlist>
1223 </sect3>
1224
1225 <sect3>
1226 <title>base</title>
1227 <itemizedlist>
1228 <listitem>
1229 <para>
1230 Version number 4.5.0.0 (was 4.4.1.0)
1231 </para>
1232 </listitem>
1233
1234 <listitem>
1235 <para>
1236 TODO: &lt;&gt;
1237 </para>
1238 </listitem>
1239
1240 <listitem>
1241 <para>
1242 TODO:
1243 commit f98a240c1c302c3d1ad56f764f4d09a03d68fbe4
1244
1245 Removing the MonadGroup class. This is to reflect the removal of the default
1246 </para>
1247 </listitem>
1248
1249 <listitem>
1250 <para>
1251 <literal>Data.List</literal> has a new function
1252 <literal>dropWhileEnd</literal>, which is similar to
1253 <literal>dropWhile</literal> except it removes the
1254 suffix of characters matching the predicate, rather
1255 than the prefix of characters.
1256 </para>
1257 </listitem>
1258
1259 <listitem>
1260 <para>
1261 The <literal>Data.Bits.Bits</literal>
1262 class has two new methods
1263 <literal>unsafeShiftL</literal> and
1264 <literal>unsafeShiftR</literal> which perform shifts
1265 on the assumption that the amount to be shifted by
1266 is positive.
1267 </para>
1268 </listitem>
1269
1270 <listitem>
1271 <para>
1272 The <literal>Data.Bits.Bits</literal>
1273 class has a new method <literal>popCount</literal>
1274 which returns the number of bits that are set in the
1275 value.
1276 </para>
1277 </listitem>
1278
1279 <listitem>
1280 <para>
1281 The <literal>C*</literal> types exported by
1282 <literal>Foreign.C.Types</literal> and
1283 <literal>System.Posix.Types</literal> are now
1284 exported non-abstractly, as the FFI now requires
1285 that the constructors for newtypes are visible.
1286 </para>
1287 </listitem>
1288
1289 <listitem>
1290 <para>
1291 In <literal>Data.Typeable</literal>,
1292 <literal>tyConString</literal> is now deprecated,
1293 in favour of the new
1294 <literal>tyConPackage</literal>,
1295 <literal>tyConModule</literal> and
1296 <literal>tyConName</literal> functions.
1297 </para>
1298 </listitem>
1299
1300 <listitem>
1301 <para>
1302 <literal>GHC.Exts.traceEvent</literal>
1303 is now deprecated. You should use the new
1304 <literal>Debug.Trace.traceEventIO</literal>
1305 instead. There is also a new function
1306 <literal>Debug.Trace.traceEvent</literal> that is
1307 analogous to <literal>Debug.Trace.trace</literal>.
1308 </para>
1309 </listitem>
1310
1311 <listitem>
1312 <para>
1313 <literal>Debug.Trace.putTraceMsg</literal>
1314 is now deprecated in favour of the new function
1315 <literal>Debug.Trace.traceIO</literal>.
1316 </para>
1317 </listitem>
1318
1319 <listitem>
1320 <para>
1321 When a program is compiled with
1322 <literal>-prof</literal>, GHC's run-time system now
1323 makes a stack trace (based on the SCCs defined)
1324 available to the program.
1325 </para>
1326 <para>
1327 There is a new function
1328 <literal>GHC.Exts.currentCallStack</literal> which
1329 returns the stack trace as a list of
1330 <literal>String</literal>s.
1331 </para>
1332 <para>
1333 There is also a new function
1334 <literal>Debug.Trace.traceStack</literal> which is
1335 like <literal>Debug.Trace.trace</literal> but also
1336 prints a call stack trace if one is available.
1337 </para>
1338 </listitem>
1339
1340 <listitem>
1341 <para>
1342 <literal>GHC.Conc</literal> has a new function,
1343 <literal>getNumProcessors</literal>, which returns
1344 the number of CPUs that the machine has.
1345 </para>
1346 </listitem>
1347
1348 <listitem>
1349 <para>
1350 <literal>GHC.Conc</literal> has a new function,
1351 <literal>setNumCapabilities</literal>, which sets
1352 the number of Haskell threads which can run
1353 simultaneously. Currently GHC only allows increasing
1354 the number of running threads.
1355 </para>
1356 </listitem>
1357
1358 <listitem>
1359 <para>
1360 The encodings used for the filesystem, for foreign
1361 calls, and for the locale, are now mutable.
1362 In order to alter them you need to use
1363 <literal>setLocaleEncoding</literal>,
1364 <literal>setFileSystemEncoding</literal> and
1365 <literal>setForeignEncoding</literal> from
1366 <literal>GHC.IO.Encoding</literal>.
1367 </para>
1368 </listitem>
1369
1370 <listitem>
1371 <para>
1372 Assertions are now better behaved; if an assertion
1373 fails then you will get an assertion error, rather
1374 than another <literal>_|_</literal> result from the
1375 expression that the assertion guards.
1376 </para>
1377 </listitem>
1378
1379 <listitem>
1380 <para>
1381 A bug in the behaviour of
1382 <literal>scaleFloat</literal> on
1383 <literal>Float</literal> and
1384 <literal>Double</literal> when used with non-finite
1385 values has been fixed.
1386 </para>
1387 </listitem>
1388
1389 <listitem>
1390 <para>
1391 A bug which meant that
1392 <literal>System.IO.fixIO</literal> was not
1393 threadsafe has been fixed.
1394 </para>
1395 <para>
1396 There is also now a new
1397 <literal>System.IO.Unsafe.unsafeFixIO</literal> that
1398 may be more efficient, but is not guaranteed to be
1399 threadsafe.
1400 </para>
1401 </listitem>
1402
1403 <listitem>
1404 <para>
1405 There is a new module <literal>GHC.Stats</literal>
1406 which exports a function
1407 <literal>getGCStats</literal> which gives some info
1408 from the runtime system using the
1409 <literal>GCStats</literal> type.
1410 </para>
1411 </listitem>
1412
1413 <listitem>
1414 <para>
1415 Support for platforms where word size is less than
1416 32bits has been removed.
1417 </para>
1418 </listitem>
1419 </itemizedlist>
1420 </sect3>
1421
1422 <sect3>
1423 <title>bin-package-db</title>
1424 <itemizedlist>
1425 <listitem>
1426 <para>
1427 This is an internal package, and should not be used.
1428 </para>
1429 </listitem>
1430 </itemizedlist>
1431 </sect3>
1432
1433 <sect3>
1434 <title>binary</title>
1435 <itemizedlist>
1436 <listitem>
1437 <para>
1438 Version number 0.5.0.3 (was 0.5.0.2)
1439 It is now exposed by default.
1440 </para>
1441 </listitem>
1442 </itemizedlist>
1443 </sect3>
1444
1445 <sect3>
1446 <title>bytestring</title>
1447 <itemizedlist>
1448 <listitem>
1449 <para>
1450 Version number 0.9.2.1 (was 0.9.2.0)
1451 </para>
1452 </listitem>
1453 </itemizedlist>
1454 </sect3>
1455
1456 <sect3>
1457 <title>Cabal</title>
1458 <itemizedlist>
1459 <listitem>
1460 <para>
1461 Version number 1.14.0.0 (was 1.12.0.0)
1462 </para>
1463 </listitem>
1464
1465 <listitem>
1466 <para>
1467 For details of the changes to the Cabal library,
1468 plese see the Cabal changelog.
1469 TODO: add a link
1470 </para>
1471 </listitem>
1472 </itemizedlist>
1473 </sect3>
1474
1475 <sect3>
1476 <title>containers</title>
1477 <itemizedlist>
1478 <listitem>
1479 <para>
1480 Version number 0.4.2.1 (was 0.4.1.0)
1481 </para>
1482 </listitem>
1483
1484 <listitem>
1485 <para>
1486 <literal>Data.Map</literal>
1487 now exports
1488 <literal>foldr</literal>,
1489 <literal>foldr'</literal>,
1490 <literal>foldl</literal> and
1491 <literal>foldl'</literal>.
1492 </para>
1493 </listitem>
1494
1495 <listitem>
1496 <para>
1497 <literal>Data.Set</literal>
1498 now exports
1499 <literal>foldr</literal>,
1500 <literal>foldr'</literal>,
1501 <literal>foldl</literal> and
1502 <literal>foldl'</literal>.
1503 </para>
1504 </listitem>
1505
1506 <listitem>
1507 <para>
1508 <literal>Data.IntMap</literal>
1509 now exports
1510 <literal>foldr</literal>,
1511 <literal>foldr'</literal>,
1512 <literal>foldl</literal>,
1513 <literal>foldl'</literal>,
1514 <literal>foldrWithKey</literal>,
1515 <literal>foldrWithKey'</literal>,
1516 <literal>foldlWithKey</literal> and
1517 <literal>foldlWithKey'</literal>.
1518 </para>
1519 </listitem>
1520
1521 <listitem>
1522 <para>
1523 <literal>Data.IntSet</literal>
1524 now exports
1525 <literal>foldr</literal>,
1526 <literal>foldr'</literal>,
1527 <literal>foldl</literal> and
1528 <literal>foldl'</literal>.
1529 </para>
1530 </listitem>
1531
1532 <listitem>
1533 <para>
1534 <literal>Data.Map.foldWithKey</literal> is no
1535 longer deprecated, although it is expected to
1536 be deprecated again in the future.
1537 </para>
1538 </listitem>
1539
1540 <listitem>
1541 <para>
1542 There are now
1543 <literal>NFData</literal>
1544 instance for
1545 <literal>Data.Map.Map</literal>,
1546 <literal>Data.Set.Set</literal>,
1547 <literal>Data.IntMap.IntMap</literal>,
1548 <literal>Data.IntSet.IntSet</literal> and
1549 <literal>Data.Tree.Tree</literal>.
1550 </para>
1551 </listitem>
1552 </itemizedlist>
1553 </sect3>
1554
1555 <sect3>
1556 <title>deepseq</title>
1557 <itemizedlist>
1558 <listitem>
1559 <para>
1560 New package, version 1.3.0.0.
1561 </para>
1562 </listitem>
1563 </itemizedlist>
1564 </sect3>
1565
1566 <sect3>
1567 <title>directory</title>
1568 <itemizedlist>
1569 <listitem>
1570 <para>
1571 Version number 1.1.0.2 (was 1.1.0.1)
1572 </para>
1573 </listitem>
1574 </itemizedlist>
1575 </sect3>
1576
1577 <sect3>
1578 <title>extensible-exceptions</title>
1579 <itemizedlist>
1580 <listitem>
1581 <para>
1582 Version number 0.1.1.4 (was 0.1.1.3)
1583 </para>
1584 </listitem>
1585 </itemizedlist>
1586 </sect3>
1587
1588 <sect3>
1589 <title>filepath</title>
1590 <itemizedlist>
1591 <listitem>
1592 <para>
1593 Version number 1.3.0.0 (was 1.2.0.1)
1594 </para>
1595 </listitem>
1596
1597 <listitem>
1598 <para>
1599 A bug, which caused
1600 <literal>normalise "/"</literal> to return
1601 <literal>"/."</literal> rather than
1602 <literal>"/"</literal>, has been fixed.
1603 </para>
1604 </listitem>
1605 </itemizedlist>
1606 </sect3>
1607
1608 <sect3>
1609 <title>ghc-prim</title>
1610 <itemizedlist>
1611 <listitem>
1612 <para>
1613 This is an internal package, and should not be used.
1614 </para>
1615 </listitem>
1616 </itemizedlist>
1617 </sect3>
1618
1619 <sect3>
1620 <title>haskell98</title>
1621 <itemizedlist>
1622 <listitem>
1623 <para>
1624 Version number 2.0.0.1 (was 2.0.0.0)
1625 </para>
1626 </listitem>
1627 </itemizedlist>
1628 </sect3>
1629
1630 <sect3>
1631 <title>haskell2010</title>
1632 <itemizedlist>
1633 <listitem>
1634 <para>
1635 Version number 1.1.0.1 (was 1.1.0.0)
1636 </para>
1637 </listitem>
1638 </itemizedlist>
1639 </sect3>
1640
1641 <sect3>
1642 <title>hoopl</title>
1643 <itemizedlist>
1644 <listitem>
1645 <para>
1646 Version number 3.8.7.3 (was 3.8.7.2)
1647 </para>
1648 </listitem>
1649
1650 <listitem>
1651 <para>
1652 A new <literal>liftFuel</literal> method has been
1653 added to
1654 <literal>Compiler.Hoopl.Fuel.FuelMonadT</literal>.
1655 </para>
1656 </listitem>
1657 </itemizedlist>
1658 </sect3>
1659
1660 <sect3>
1661 <title>hpc</title>
1662 <itemizedlist>
1663 <listitem>
1664 <para>
1665 Version number 0.5.1.1 (was 0.5.1.0)
1666 </para>
1667 </listitem>
1668 </itemizedlist>
1669 </sect3>
1670
1671 <sect3>
1672 <title>integer-gmp</title>
1673 <itemizedlist>
1674 <listitem>
1675 <para>
1676 Version number 0.4.0.0 (was 0.3.0.0)
1677 </para>
1678 </listitem>
1679
1680 <listitem>
1681 <para>
1682 There is a new module
1683 <literal>GHC.Integer.GMP.Prim</literal>
1684 that exports the Haskell imports of the GMP
1685 functions. They are no longer exported by
1686 <literal>GHC.Integer.GMP.Internals</literal>.
1687 </para>
1688 </listitem>
1689
1690 <listitem>
1691 <para>
1692 <literal>GHC.Integer.GMP.Internals</literal>
1693 now exports <literal>gcdInteger</literal> and
1694 <literal>lcmInteger</literal>. They are no longer
1695 exported by <literal>GHC.Integer</literal>.
1696 </para>
1697 </listitem>
1698
1699 <listitem>
1700 <para>
1701 There is a new function <literal>mkInteger</literal>
1702 exported from <literal>GHC.Integer.Type</literal>
1703 and <literal>GHC.Integer</literal>. It constructs an
1704 <literal>Integer</literal> from a
1705 <literal>Bool</literal> (indicating the sign) and a
1706 list of <literal>Int</literal>s (which provide the
1707 value, in 31-bit chunks, least-significant first).
1708 </para>
1709 </listitem>
1710 </itemizedlist>
1711 </sect3>
1712
1713 <sect3>
1714 <title>old-locale</title>
1715 <itemizedlist>
1716 <listitem>
1717 <para>
1718 Version number 1.0.0.4 (was 1.0.0.3)
1719 </para>
1720 </listitem>
1721 </itemizedlist>
1722 </sect3>
1723
1724 <sect3>
1725 <title>old-time</title>
1726 <itemizedlist>
1727 <listitem>
1728 <para>
1729 Version number 1.1.0.0 (was 1.0.0.7)
1730 </para>
1731 </listitem>
1732
1733 <listitem>
1734 <para>
1735 A bug which caused
1736 <literal>System.Time.formatCalendarTime</literal>
1737 to show a value 1 too low for the
1738 <literal>%j</literal> format specifier has been fixed.
1739 </para>
1740 </listitem>
1741 </itemizedlist>
1742 </sect3>
1743
1744 <sect3>
1745 <title>pretty</title>
1746 <itemizedlist>
1747 <listitem>
1748 <para>
1749 Version number 1.1.1.0 (was 1.1.0.0)
1750 </para>
1751 </listitem>
1752
1753 <listitem>
1754 <para>
1755 The recommended module is now
1756 <literal>Text.PrettyPrint</literal> rather than
1757 <literal>Text.PrettyPrint.HughesPJ</literal>.
1758 </para>
1759 </listitem>
1760
1761 <listitem>
1762 <para>
1763 Both modules now export <literal>first</literal>,
1764 which takes two documents and returns the first
1765 provided it is non-empty, and the second otherwise.
1766 </para>
1767 </listitem>
1768
1769 <listitem>
1770 <para>
1771 Both modules now export
1772 <literal>reduceDoc</literal>.
1773 </para>
1774 </listitem>
1775 </itemizedlist>
1776 </sect3>
1777
1778 <sect3>
1779 <title>process</title>
1780 <itemizedlist>
1781 <listitem>
1782 <para>
1783 Version number 1.1.0.1 (was 1.1.0.0)
1784 </para>
1785 </listitem>
1786 </itemizedlist>
1787 </sect3>
1788
1789 <sect3>
1790 <title>template-haskell</title>
1791 <itemizedlist>
1792 <listitem>
1793 <para>
1794 Version number 2.7.0.0 (was 2.6.0.0)
1795 </para>
1796 </listitem>
1797
1798 <listitem>
1799 <para>
1800 The
1801 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1802 class now has a <literal>qAddDependentFile</literal>
1803 method, which splices can use to indicate that the
1804 result of the splice depends upon the contents of
1805 a file. This tells the compiler that if the file
1806 has changed then it will need to recompile the
1807 module containing the splice.
1808 </para>
1809 <para>
1810 There is also a new helper function
1811 <literal>addDependentFile</literal> in
1812 <literal>Language.Haskell.TH.Syntax</literal>.
1813 </para>
1814 </listitem>
1815
1816 <listitem>
1817 <para>
1818 The
1819 <literal>Language.Haskell.TH.Syntax.Exp</literal>
1820 type now has <literal>UInfixE</literal> and
1821 <literal>ParensE</literal> constructors, and
1822 <literal>Language.Haskell.TH.Syntax.Pat</literal>
1823 gains corresponding <literal>UInfixP</literal>
1824 and <literal>ParensP</literal> constructors.
1825 </para>
1826 <para>
1827 There are corresponding helper functions
1828 <literal>uInfixE</literal>,
1829 <literal>parensE</literal>,
1830 <literal>uInfixP</literal> and
1831 <literal>parensP</literal> defined in
1832 <literal>Language.Haskell.TH.Lib</literal>
1833 and re-exported by
1834 <literal>Language.Haskell.TH</literal>.
1835 </para>
1836 <para>
1837 These constructors are used for infix expressions
1838 where the fixities of the operators are not known.
1839 The compiler will look up the fixities and
1840 reassociate the expression as necessary.
1841 </para>
1842 <para>
1843 There is also a new value
1844 <literal>Language.Haskell.TH.Ppr.unopPrec</literal>
1845 used when pretty-printing expressions of unknown
1846 fixity.
1847 </para>
1848 </listitem>
1849
1850 <listitem>
1851 <para>
1852 The
1853 <literal>Language.Haskell.TH.Syntax.Strict</literal>
1854 type now has an <literal>Unpacked</literal>
1855 constructor, which corresponds to the
1856 <literal>{-# UNPACK #-}</literal> pragma.
1857 There is a corresponding helper function
1858 <literal>Language.Haskell.TH.Lib.unpacked</literal>.
1859 </para>
1860 </listitem>
1861
1862 <listitem>
1863 <para>
1864 The
1865 <literal>Language.Haskell.TH.Syntax.Info</literal>
1866 type has a new constructor
1867 <literal>FamilyI</literal>, used when reifying a
1868 data or type family's name.
1869 </para>
1870 </listitem>
1871
1872 <listitem>
1873 <para>
1874 The
1875 <literal>Language.Haskell.TH.Syntax.ClassInstance</literal>
1876 type has been removed, and the
1877 <literal>ClassI</literal> constructor of
1878 <literal>Language.Haskell.TH.Syntax.Info</literal>
1879 now contains <literal>[InstanceDec]</literal>
1880 rather than <literal>[ClassInstance]</literal>.
1881 </para>
1882 <para>
1883 <literal>Language.Haskell.TH.Syntax.InstanceDec</literal>
1884 is a new type synonym of
1885 <literal>Language.Haskell.TH.Syntax.Dec</literal>,
1886 but its constructor is guaranteed to be one of
1887 <literal>InstanceD</literal> (with empty
1888 <literal>[Dec]</literal>),
1889 <literal>DataInstD</literal> or
1890 <literal>NewtypeInstD</literal> (with empty derived
1891 <literal>[Name]</literal>), or
1892 <literal>TySynInstD</literal>.
1893 </para>
1894 <para>
1895 The <literal>qClassInstances</literal> method of the
1896 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1897 class has been replaced with a
1898 <literal>qReifyInstances</literal> method.
1899 </para>
1900 <para>
1901 Likewise, in
1902 <literal>Language.Haskell.TH.Syntax</literal>, the
1903 <literal>isClassInstance</literal> and
1904 <literal>classInstances</literal> functions have
1905 been replaced by <literal>isInstance</literal> and
1906 <literal>reifyInstances</literal>. They are also
1907 re-exported by
1908 <literal>Language.Haskell.TH</literal>.
1909 </para>
1910 </listitem>
1911
1912 <listitem>
1913 <para>
1914 The
1915 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1916 class now has a <literal>qLookupName</literal>
1917 method, which takes a
1918 <literal>Bool</literal>
1919 indictaing whether you are looking for a type or a
1920 value, and a
1921 <literal>String</literal>.
1922 It then tries to look up the name, returning a
1923 <literal>Maybe Name</literal> in the monad.
1924 </para>
1925 <para>
1926 There are also new helper functions
1927 <literal>lookupTypeName</literal> and
1928 <literal>lookupValueName</literal>, which are also
1929 re-exported by
1930 <literal>Language.Haskell.TH</literal>.
1931 </para>
1932 </listitem>
1933
1934 <listitem>
1935 <para>
1936 The
1937 <literal>Language.Haskell.TH.Syntax.Quasi</literal>
1938 class now has an <literal>Applicative</literal>
1939 superclass, rather than a <literal>Functor</literal>
1940 superclass. There is also now an
1941 <literal>Applicative</literal> instance for
1942 <literal>Language.Haskell.TH.Syntax.Q</literal>.
1943 </para>
1944 </listitem>
1945
1946 <listitem>
1947 <para>
1948 The <literal>NameSpace</literal> type is now
1949 abstractly re-exported by
1950 <literal>Language.Haskell.TH</literal>.
1951 </para>
1952 </listitem>
1953 </itemizedlist>
1954 </sect3>
1955
1956 <sect3>
1957 <title>time</title>
1958 <itemizedlist>
1959 <listitem>
1960 <para>
1961 Version number 1.4 (was 1.2.0.5)
1962 </para>
1963 </listitem>
1964
1965 <listitem>
1966 <para>
1967 A <literal>RealFrac</literal>
1968 instance has been added for
1969 <literal>Data.Time.Clock.Scale.DiffTime</literal>.
1970 </para>
1971 </listitem>
1972
1973 <listitem>
1974 <para>
1975 <literal>NFData</literal>
1976 instances have been added for
1977 <literal>Data.Time.Calendar.Days.Day</literal>,
1978 <literal>Data.Time.Clock.Scale.UniversalTime</literal>,
1979 <literal>Data.Time.Clock.Scale.DiffTime</literal>,
1980 <literal>Data.Time.Clock.TAI.AbsoluteTime</literal>,
1981 <literal>Data.Time.Clock.UTC.UTCTime</literal>,
1982 <literal>Data.Time.Clock.UTC.NominalDiffTime</literal>,
1983 <literal>Data.Time.LocalTime.LocalTime.LocalTime</literal>,
1984 <literal>Data.Time.LocalTime.LocalTime.ZonedTime</literal>,
1985 <literal>Data.Time.LocalTime.TimeOfDay.TimeOfDay</literal>
1986 and
1987 <literal>Data.Time.LocalTime.TimeZone.TimeZone</literal>.
1988 </para>
1989 </listitem>
1990 </itemizedlist>
1991 </sect3>
1992
1993 <sect3>
1994 <title>unix</title>
1995 <itemizedlist>
1996 <listitem>
1997 <para>
1998 Version number 2.5.1.0 (was 2.5.0.0)
1999 </para>
2000 </listitem>
2001
2002 <listitem>
2003 <para>
2004 <literal>System.Posix</literal> now re-exports
2005 <literal>System.Posix.DynamicLinker</literal>
2006 (although it hides the <literal>Default</literal>
2007 constructor, as that clashes with the constructor
2008 of the same name of the
2009 <literal>System.Posix.Signals.Handler</literal>
2010 type).
2011 </para>
2012 </listitem>
2013
2014 <listitem>
2015 <para>
2016 There is now a raw bytestring version of the
2017 filepath and environment APIs. It uses a
2018 <literal>RawFilePath = ByteString</literal>
2019 type synonym, and adds a number of new exposed
2020 modules:
2021 <literal>System.Posix.ByteString</literal>,
2022 <literal>System.Posix.ByteString.FilePath</literal>,
2023 <literal>System.Posix.Directory.ByteString</literal>,
2024 <literal>System.Posix.DynamicLinker.Module.ByteString</literal>,
2025 <literal>System.Posix.DynamicLinker.ByteString</literal>,
2026 <literal>System.Posix.Files.ByteString</literal>,
2027 <literal>System.Posix.IO.ByteString</literal>,
2028 <literal>System.Posix.Env.ByteString</literal>,
2029 <literal>System.Posix.Process.ByteString</literal>,
2030 <literal>System.Posix.Temp.ByteString</literal> and
2031 <literal>System.Posix.Terminal.ByteString</literal>.
2032 </para>
2033 </listitem>
2034 </itemizedlist>
2035 </sect3>
2036
2037 <sect3>
2038 <title>Win32</title>
2039 <itemizedlist>
2040 <listitem>
2041 <para>
2042 Version number 2.2.2.0 (was 2.2.1.0)
2043 </para>
2044 </listitem>
2045
2046 <listitem>
2047 <para>
2048 <literal>System.Win32.File</literal> now exports
2049 <literal>failIfWithRetry</literal>,
2050 <literal>failIfWithRetry_</literal> and
2051 <literal>failIfFalseWithRetry_</literal>.
2052 </para>
2053 </listitem>
2054 </itemizedlist>
2055 </sect3>
2056 </sect2>
2057 </sect1>
2058