Mention #3202 (no monomorphism restriction in GHCi) in release notes
[ghc.git] / docs / users_guide / 7.8.1-notes.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-7-8-1">
3 <title>Release notes for version 7.8.1</title>
4
5 <para>
6 The significant changes to the various parts of the compiler are listed
7 in the following sections. There have also been numerous bug fixes and
8 performance improvements over the 7.6 branch.
9 </para>
10
11 <sect2>
12 <title>Highlights</title>
13
14 <para>
15 The highlights, since the 7.6 branch, are:
16 </para>
17
18 <itemizedlist>
19 <listitem>
20 <para>
21 OS X Mavericks with XCode 5 is now properly supported
22 by GHC. As a result of this, GHC now uses Clang to
23 preprocess Haskell code by default for Mavericks
24 builds.
25 </para>
26
27 <para>
28 Note that normally, GHC used <literal>gcc</literal> as
29 the preprocessor for Haskell code (as it was the
30 default everywhere,) which implements
31 <literal>-traditional</literal> behavior. However,
32 Clang is not 100% compatible with GCC's
33 <literal>-traditional</literal> as it is rather
34 implementation specified and does not match any
35 specification. Clang is also more strict.
36 </para>
37
38 <para>
39 As a result of this, when using Clang as the
40 preprocessor, some programs which previously used
41 <literal>-XCPP</literal> and the preprocessor will now
42 fail to compile. Users who wish to retain the previous
43 behavior are better off using cpphs as an external
44 preprocessor for the time being.
45 </para>
46
47 <para>
48 In the future, we hope to fix this by adopting a
49 better preprocessor implementation independent of the
50 C compiler (perhaps cpphs itself,) and ship that
51 instead.
52 </para>
53 </listitem>
54
55 <listitem>
56 <para>
57 By default, GHC has a new warning enabled,
58 <literal>-fwarn-typed-holes</literal>, which causes the
59 compiler to respond with the types of unbound
60 variables it encounters in the source code. (It is
61 reminiscient of the "holes" feature in languages such
62 as Agda.)
63
64 For more information, see <xref linkend="typed-holes"/>.
65 </para>
66 </listitem>
67
68 <listitem>
69 <para>
70 GHC can now perform simple evaluation of type-level
71 natural numbers, when using the
72 <literal>DataKinds</literal> extension. For example,
73 given a type-level constraint such as <literal>(x + 3)
74 ~ 5</literal>, GHC is able to infer that
75 <literal>x</literal> is 2. Similarly, GHC can now
76 understand type-level identities such as <literal>x +
77 0 ~ x</literal>.
78 </para>
79
80 <para>
81 Note that the solving of these equations is only used
82 to resolve unification variables - it does not
83 generate new facts in the type checker. This is
84 similar to how functional dependencies work.
85 </para>
86 </listitem>
87
88 <listitem>
89 <para>
90 It is now possible to declare a 'closed' <literal>type
91 family</literal> when using the
92 <literal>TypeFamilies</literal> extension. A closed
93 <literal>type family</literal> cannot have any
94 instances created other than the ones in its
95 definition.
96
97 For more information, see <xref linkend="closed-type-families"/>.
98 </para>
99 </listitem>
100
101 <listitem>
102 <para>
103 Use of the <literal>GeneralizedNewtypeDeriving</literal>
104 extension is now subject to <emphasis>role checking</emphasis>,
105 to ensure type safety of the derived instances. As this change
106 increases the type safety of GHC, it is possible that some code
107 that previously compiled will no longer work.
108
109 For more information, see <xref linkend="roles"/>.
110 </para>
111 </listitem>
112
113 <listitem>
114 <para>
115 GHC now supports overloading list literals using the new
116 <literal>OverloadedLists</literal> extension.
117
118 For more information, see <xref linkend="overloaded-lists"/>.
119 </para>
120 </listitem>
121
122 <listitem>
123 <para>
124 GHC now supports pattern synonyms, enabled by the
125 <literal>-XPatternSynonyms</literal> extension,
126 allowing you to name and abstract over patterns more
127 easily.
128
129 For more information, see <xref linkend="pattern-synonyms"/>.
130 </para>
131 <para>
132 Note: For the GHC 7.8.1 version, this language feature
133 should be regarded as a preview.
134 </para>
135 </listitem>
136
137 <listitem>
138 <para>
139 There has been significant overhaul of the type
140 inference engine and constraint solver, meaning it
141 should be faster and use less memory.
142 </para>
143 </listitem>
144
145 <listitem>
146 <para>
147 By default, GHC will now unbox all "small" strict
148 fields in a data type. A "small" data type is one
149 whose size is equivalent to or smaller than the native
150 word size of the machine. This means you no longer
151 have to specify <literal>UNPACK</literal> pragmas for
152 e.g. strict <literal>Int</literal> fields. This also
153 applies to floating-point values.
154 </para>
155 </listitem>
156
157 <listitem>
158 <para>
159 GHC now has a brand-new I/O manager that scales significantly
160 better for larger workloads compared to the previous one. It
161 should scale linearly up to approximately 32 cores.
162 </para>
163 </listitem>
164
165 <listitem>
166 <para>
167 The LLVM backend now supports 128- and 256-bit SIMD
168 operations.
169 </para>
170 <para>
171 Note carefully: this is <emphasis>only</emphasis> available with
172 the LLVM backend, and should be considered
173 experimental.
174 </para>
175 </listitem>
176
177 <listitem>
178 <para>
179 The new code generator, after significant work by many
180 individuals over the past several years, is now enabled by
181 default. This is a complete rewrite of the STG to Cmm
182 transformation. In general, your programs may get slightly
183 faster.
184 </para>
185
186 <para>
187 The old code generator has been removed completely.
188 </para>
189 </listitem>
190
191 <listitem>
192 <para>
193 GHC now has substantially better support for cross
194 compilation. In particular, GHC now has all the
195 necessary patches to support cross compilation to
196 Apple iOS, using the LLVM backend.
197 </para>
198 </listitem>
199
200 <listitem>
201 <para>
202 PrimOps for comparing unboxed values now return
203 <literal>Int#</literal> instead of <literal>Bool</literal>.
204 This change is backwards incompatible. See
205 <ulink url="http://ghc.haskell.org/trac/ghc/wiki/NewPrimopsInGHC7.8">
206 this GHC wiki page</ulink> for instructions how to update your
207 existing code. See <ulink url="http://ghc.haskell.org/trac/ghc/wiki/PrimBool">
208 here</ulink> for motivation and discussion of implementation details.
209 </para>
210 </listitem>
211
212 <listitem>
213 <para>
214 New PrimOps for atomic memory operations.
215 The <literal>casMutVar#</literal> PrimOp was introduced in
216 GHC 7.2 (debugged in 7.4). This release also includes additional
217 PrimOps for compare-and-swap (<literal>casArray#</literal> and
218 <literal>casIntArray#</literal>) and one for fetch-and-add
219 (<literal>fetchAddIntArray#</literal>).
220 </para>
221 </listitem>
222
223 <listitem>
224 <para>
225 On Linux, FreeBSD and Mac OS X, GHCi now uses the
226 system dynamic linker by default, instead of its built
227 in (static) object linker. This is more robust
228 cross-platform, and fixes many long-standing bugs (for
229 example: constructors and destructors, weak symbols,
230 etc work correctly, and several edge cases in the RTS
231 are fixed.)
232 </para>
233
234 <para>
235 As a result of this, GHCi (and Template Haskell) must
236 now load <emphasis>dynamic</emphasis> object files, not static
237 ones. To assist this, there is a new compilation flag,
238 <literal>-dynamic-too</literal>, which when used
239 during compilation causes GHC to emit both static and
240 dynamic object files at the same time. GHC itself
241 still defaults to static linking.
242 </para>
243
244 <para>
245 Note that Cabal will correctly handle
246 <literal>-dynamic-too</literal> for you automatically,
247 especially when <literal>-XTemplateHaskell</literal>
248 is needed - but you <emphasis>must</emphasis> tell Cabal you are
249 using the <literal>TemplateHaskell</literal>
250 extension.
251 </para>
252
253 <para>
254 Currently, Dynamic GHCi and
255 <literal>-dynamic-too</literal> are not supported on
256 Windows (32bit or 64bit.)
257 </para>
258 </listitem>
259
260 <listitem>
261 <para>
262 <literal>Typeable</literal> is now poly-kinded, making
263 <literal>Typeable1</literal>, <literal>Typeable2</literal>,
264 etc., obsolete, deprecated, and relegated to
265 <literal>Data.OldTypeable</literal>. Furthermore, user-written
266 instances of <literal>Typeable</literal> are now disallowed:
267 use <literal>deriving</literal> or the new extension
268 <literal>-XAutoDeriveTypeable</literal>, which will create
269 <literal>Typeable</literal> instances for every datatype
270 declared in the module.
271 </para>
272 </listitem>
273
274 <listitem>
275 <para>
276 GHC now has a parallel compilation driver. When
277 compiling with <literal>--make</literal> (which is on
278 by default,) you may also specify
279 <literal>-jN</literal> in order to compile
280 <replaceable>N</replaceable> modules in
281 parallel. (Note: this will automatically scale on
282 multicore machines without specifying <literal>+RTS
283 -N</literal> to the compiler.)
284 </para>
285 </listitem>
286
287 <listitem>
288 <para>
289 GHC now has support for a new pragma,
290 <literal>{-# MINIMAL #-}</literal>, allowing you to
291 explicitly declare the minimal complete definition of
292 a class. Should an instance not provide the minimal
293 required definitions, a warning will be emitted.
294 </para>
295 </listitem>
296
297 <listitem>
298 <para>
299 In GHC 7.10, <literal>Applicative</literal> will
300 become a superclass of <literal>Monad</literal>,
301 potentially breaking a lot of user code. To ease this
302 transition, GHC now generates warnings when
303 definitions conflict with the Applicative-Monad
304 Proposal (AMP).
305 </para>
306
307 <para>
308 A warning is emitted if a type is an instance of
309 <literal>Monad</literal> but not of
310 <literal>Applicative</literal>,
311 <literal>MonadPlus</literal> but not
312 <literal>Alternative</literal>, and when a local
313 function named <literal>join</literal>,
314 <literal>&lt;*&gt;</literal> or <literal>pure</literal> is
315 defined.
316 </para>
317
318 <para>
319 The warnings are enabled by default, and can be controlled
320 using the new flag <literal>-f[no-]warn-amp</literal>.
321 </para>
322 </listitem>
323
324 <listitem>
325 <para>
326 Using the new <literal>InterruptibleFFI</literal>
327 extension, it's possible to now declare a foreign
328 import as <literal>interruptible</literal>, as opposed
329 to only <literal>safe</literal> or
330 <literal>unsafe</literal>. An
331 <literal>interruptible</literal> foreign call is the
332 same as a <literal>safe</literal> call, but may be
333 interrupted by asynchronous <emphasis>Haskell
334 exceptions</emphasis>, such as those generated by
335 <literal>throwTo</literal> or
336 <literal>timeout</literal>.
337 </para>
338
339 <para>
340 For more information (including the exact details on
341 how the foreign thread is interrupted,) see <xref
342 linkend="ffi-interruptible"/>.
343 </para>
344 </listitem>
345
346 <listitem>
347 <para>
348 GHC's internal compiler pipeline is now exposed
349 through a <literal>Hooks</literal> module inside the
350 GHC API. These hooks allow you to control most of the
351 internal compiler phase machinery, including compiling
352 expressions, phase control, and linking.
353 </para>
354
355 <para>
356 Note: this interface will likely see continuous
357 refinement and API changes in future releases, so it
358 should be considered a preview.
359 </para>
360 </listitem>
361 </itemizedlist>
362 </sect2>
363
364 <sect2>
365 <title>Full details</title>
366 <sect3>
367 <title>Language</title>
368 <itemizedlist>
369 <listitem>
370 <para>
371 There is a new extension,
372 <literal>NullaryTypeClasses</literal>, which
373 allows you to declare a type class without any
374 parameters.
375 </para>
376 </listitem>
377 </itemizedlist>
378
379 <itemizedlist>
380 <listitem>
381 <para>
382 There is a new extension,
383 <literal>NumDecimals</literal>, which allows you
384 to specify an integer using compact "floating
385 literal" syntax. This lets you say things like
386 <literal>1.2e6 :: Integer</literal> instead of
387 <literal>1200000</literal>
388 </para>
389 </listitem>
390 </itemizedlist>
391
392 <itemizedlist>
393 <listitem>
394 <para>
395 There is a new extension,
396 <literal>NegativeLiterals</literal>, which will
397 cause GHC to interpret the expression
398 <literal>-123</literal> as <literal>fromIntegral
399 (-123)</literal>. Haskell 98 and Haskell 2010 both
400 specify that it should instead desugar to
401 <literal>negate (fromIntegral 123)</literal>
402 </para>
403 </listitem>
404 </itemizedlist>
405
406 <itemizedlist>
407 <listitem>
408 <para>
409 There is a new extension,
410 <literal>EmptyCase</literal>, which allows
411 to write a case expression with no alternatives
412 <literal>case ... of {}</literal>.
413 </para>
414 </listitem>
415 </itemizedlist>
416
417 <itemizedlist>
418 <listitem>
419 <para>
420 The <literal>IncoherentInstances</literal>
421 extension has seen a behavioral change, and is
422 now 'liberated' and less conservative during
423 instance resolution. This allows more programs to
424 compile than before.
425 </para>
426 <para>
427 Now, <literal>IncoherentInstances</literal> will
428 always pick an arbitrary matching instance, if
429 multiple ones exist.
430 </para>
431 </listitem>
432 </itemizedlist>
433
434 <itemizedlist>
435 <listitem>
436 <para>
437 A new built-in function <literal>coerce</literal> is
438 provided that allows to safely coerce values between types
439 that have the same run-time-presentation, such as
440 newtypes, but also newtypes inside containers. See the
441 haddock documentation of
442 <ulink url="&libraryBaseLocation;/GHC-Exts.html#v%3Acoerce">coerce</ulink>
443 and of the class
444 <ulink url="&libraryBaseLocation;/GHC-Exts.html#t%3ACoercible">Coercible</ulink>
445 for more details.
446 </para>
447 <para>
448 This feature is included in this release as a technology
449 preview, and may change its syntax and/or semantics in the
450 next release.
451 </para>
452 </listitem>
453 </itemizedlist>
454
455 <itemizedlist>
456 <listitem>
457 <para>
458 The new pragma, <literal>{-# MINIMAL #-}</literal>,
459 allows to explicitly declare the minimal complete
460 definition of a class. Should an instance not provide
461 the minimal required definitions, a warning will be
462 emitted.
463 </para>
464
465 <para>
466 See <xref linkend="minimal-pragma"/> for more details.
467 </para>
468 </listitem>
469 </itemizedlist>
470 </sect3>
471
472 <sect3>
473 <title>Compiler</title>
474 <itemizedlist>
475 <listitem>
476 <para>
477 GHC can now build both static and dynamic object
478 files at the same time in a single compilation
479 pass, when given the
480 <literal>-dynamic-too</literal> flag. This will
481 produce both a statically-linkable
482 <literal>.o</literal> object file, and a
483 dynamically-linkable <literal>.dyn_o</literal>
484 file. The output suffix of the dynamic objects can
485 be controlled by the flag
486 <literal>-dynosuf</literal>.
487 </para>
488
489 <para>
490 Note that GHC still builds statically by default.
491 </para>
492 </listitem>
493 <listitem>
494 <para>
495 GHC now supports a
496 <literal>--show-options</literal> flag, which will
497 dump all of the flags it supports to standard out.
498 </para>
499 </listitem>
500 <listitem>
501 <para>
502 GHC now supports warning about overflow of integer
503 literals, enabled by
504 <literal>-fwarn-overflowed-literals</literal>. It
505 is enabled by default.
506 </para>
507 </listitem>
508 <listitem>
509 <para>
510 It's now possible to switch the system linker on Linux
511 (between GNU gold and GNU ld) at runtime without problem.
512 </para>
513 </listitem>
514 <listitem>
515 <para>
516 The <literal>-fwarn-dodgy-imports</literal> flag now warns
517 in the case an <literal>import</literal> statement hides an
518 entity which is not exported.
519 </para>
520 </listitem>
521 <listitem>
522 <para>
523 The LLVM backend was overhauled and rewritten, and
524 should hopefully be easier to maintain and work on
525 in the future.
526 </para>
527 </listitem>
528 <listitem>
529 <para>
530 GHC now detects annotation changes during
531 recompilation, and correctly persists new
532 annotations.
533 </para>
534 </listitem>
535 <listitem>
536 <para>
537 There is a new set of primops for utilizing
538 hardware-based prefetch instructions, to help
539 guide the processor's caching decisions.
540 </para>
541 <para>
542 Currently, these are only supported with the LLVM
543 backend and x86/amd64 backends.
544 </para>
545 </listitem>
546 </itemizedlist>
547 </sect3>
548
549 <sect3>
550 <title>GHCi</title>
551 <itemizedlist>
552 <listitem>
553 The monomorphism restriction is now turned off
554 by default in GHCi.
555 </listitem>
556
557 <listitem>
558 <para>
559 GHCi now supports a <literal>prompt2</literal>
560 setting, which allows you to customize the
561 continuation prompt of multi-line input.
562
563 For more information, see <xref linkend="ghci-commands"/>.
564 </para>
565 </listitem>
566 <listitem>
567 <para>
568 The new <literal>:shows paths</literal> command
569 shows the current working directory and the
570 current search path for Haskell modules.
571 </para>
572 </listitem>
573
574 <listitem>
575 <para>
576 On Linux, the static GHCi linker now supports weak symbols.
577 </para>
578 </listitem>
579
580 <listitem>
581 <para>
582 The (static) GHCi linker now runs constructors for
583 linked libraries. This means for example that C
584 code using
585 <literal>__attribute__((constructor))</literal>
586 can now properly be loaded into GHCi.
587 </para>
588
589 <para>
590 Note: destructors are not supported.
591 </para>
592 </listitem>
593 </itemizedlist>
594 </sect3>
595
596 <sect3>
597 <title>Template Haskell</title>
598 <itemizedlist>
599 <listitem>
600 <para>
601 Template Haskell now supports Roles.
602 </para>
603 </listitem>
604 <listitem>
605 <para>
606 Template Haskell now supports annotation pragmas.
607 </para>
608 </listitem>
609 <listitem>
610 <para>
611 Typed Template Haskell expressions are now supported. See
612 <xref linkend="template-haskell"/> for more details.
613 </para>
614 </listitem>
615 <listitem>
616 <para>
617 Template Haskell declarations, types, patterns, and
618 <emphasis>untyped</emphasis> expressions are no longer
619 typechecked at all. This is a backwards-compatible change
620 since it allows strictly more programs to be typed.
621 </para>
622 </listitem>
623 </itemizedlist>
624 </sect3>
625
626 <sect3>
627 <title>Runtime system</title>
628 <itemizedlist>
629 <listitem>
630 <para>
631 The RTS linker can now unload object code at
632 runtime (when using the GHC API
633 <literal>ObjLink</literal> module.) Previously,
634 GHC would not unload the old object file, causing
635 a gradual memory leak as more objects were loaded
636 over time.
637 </para>
638
639 <para>
640 Note that this change in unloading behavior
641 <emphasis>only</emphasis> affects statically
642 linked binaries, and not dynamic ones.
643 </para>
644 </listitem>
645
646 <listitem>
647 <para>
648 The performance of <literal>StablePtr</literal>s and
649 <literal>StableName</literal>s has been improved.
650 </para>
651 </listitem>
652
653 <listitem>
654 <para>
655 The default maximum stack size has
656 increased. Previously, it defaulted to 8m
657 (equivalent to passing <literal>+RTS
658 -K8m</literal>. Now, GHC will use up-to 80% of the
659 <emphasis>physical memory</emphasis> available at
660 runtime.
661 </para>
662 </listitem>
663 </itemizedlist>
664 </sect3>
665
666 <sect3>
667 <title>Build system</title>
668 <itemizedlist>
669 <listitem>
670 <para>
671 GHC >= 7.4 is now required for bootstrapping.
672 </para>
673 </listitem>
674 <listitem>
675 <para>
676 GHC can now be built with Clang, and use Clang as
677 the preprocessor for Haskell code. Only Clang
678 version 3.4 (or Apple LLVM Clang 5.0) or beyond is
679 reliably supported.
680 </para>
681
682 <para>
683 Note that normally, GHC uses
684 <literal>gcc</literal> as the preprocessor for
685 Haskell code, which implements
686 <literal>-traditional</literal> behavior. However,
687 Clang is not 100% compatible with GCC's
688 <literal>-traditional</literal> as it is rather
689 implementation specified, and is more strict.
690 </para>
691
692 <para>
693 As a result of this, when using Clang as the
694 preprocessor, some programs which previously used
695 <literal>-XCPP</literal> and the preprocessor will
696 now fail to compile. Users who wish to retain the
697 previous behavior are better off using cpphs.
698 </para>
699 </listitem>
700 </itemizedlist>
701 </sect3>
702 </sect2>
703
704 <sect2>
705 <title>Libraries</title>
706
707 <para>
708 There have been some changes that have effected multiple
709 libraries:
710 </para>
711
712 <itemizedlist>
713 <listitem>
714 <para>
715 TODO FIXME
716 </para>
717 </listitem>
718 </itemizedlist>
719
720 <sect3>
721 <title>array</title>
722 <itemizedlist>
723 <listitem>
724 <para>
725 Version number 0.5.0.0 (was 0.4.0.1)
726 </para>
727 </listitem>
728 </itemizedlist>
729 </sect3>
730
731 <sect3>
732 <title>base</title>
733 <itemizedlist>
734 <listitem>
735 <para>
736 Version number 4.7.0.0 (was 4.6.0.1)
737 </para>
738 </listitem>
739 <listitem>
740 <para>
741 The <literal>Control.Category</literal> module now has the
742 <literal>PolyKinds</literal> extension enabled, meaning
743 that instances of <literal>Category</literal> no longer
744 need be of kind <literal>* -> * -> *</literal>.
745 </para>
746 </listitem>
747 <listitem>
748 <para>
749 There are now <literal>Foldable</literal> and <literal>Traversable</literal>
750 instances for <literal>Either a</literal>, <literal>Const r</literal>, and <literal>(,) a</literal>.
751 </para>
752 </listitem>
753 <listitem>
754 <para>
755 There is now a <literal>Monoid</literal> instance for <literal>Const</literal>.
756 </para>
757 </listitem>
758 <listitem>
759 <para>
760 There is now a <literal>Data</literal> instance for <literal>Data.Version</literal>.
761 </para>
762 </listitem>
763 <listitem>
764 <para>
765 There are now <literal>Eq</literal>, <literal>Ord</literal>, <literal>Show</literal> and <literal>Read</literal> instances for <literal>ZipList</literal>.
766 </para>
767 </listitem>
768 <listitem>
769 <para>
770 There are now <literal>Eq</literal>, <literal>Ord</literal>, <literal>Show</literal> and <literal>Read</literal> instances for <literal>Down</literal>.
771 </para>
772 </listitem>
773 <listitem>
774 <para>
775 There are now <literal>Eq</literal>, <literal>Ord</literal>, <literal>Show</literal>, <literal>Read</literal> and <literal>Generic</literal> instances for types in GHC.Generics (<literal>U1</literal>, <literal>Par1</literal>, <literal>Rec1</literal>, <literal>K1</literal>, <literal>M1</literal>, <literal>(:+:)</literal>, <literal>(:*:)</literal>, <literal>(:.:)</literal>).
776 </para>
777 </listitem>
778 <listitem>
779 <para>
780 A zero-width unboxed poly-kinded <literal>Proxy#</literal>
781 was added to <literal>GHC.Prim</literal>. It can be used to make it so
782 that there is no the operational overhead for passing around proxy
783 arguments to model type application.
784 </para>
785 </listitem>
786 <listitem>
787 <para>
788 <literal>Control.Concurrent.MVar</literal> has a new
789 implementation of <literal>readMVar</literal>, which
790 fixes a long-standing bug where
791 <literal>readMVar</literal> is only atomic if there
792 are no other threads running
793 <literal>putMVar</literal>.
794 <literal>readMVar</literal> now is atomic, and is
795 guaranteed to return the value from the first
796 <literal>putMVar</literal>. There is also a new <literal>tryReadMVar</literal>
797 which is a non-blocking version.
798 </para>
799 </listitem>
800 <listitem>
801 <para>
802 There are now byte endian-swapping primitives
803 available in <literal>Data.Word</literal>, which
804 use optimized machine instructions when available.
805 </para>
806 </listitem>
807 <listitem>
808 <para>
809 <literal>Data.Bool</literal> now exports
810 <literal>bool :: a -> a -> Bool -> a</literal>, analogously
811 to <literal>maybe</literal> and <literal>either</literal>
812 in their respective modules.
813 </para>
814 </listitem>
815 <listitem>
816 <para>
817 Rewrote portions of <literal>Text.Printf</literal>, and
818 made changes to <literal>Numeric</literal> (added
819 <literal>Numeric.showFFloatAlt</literal> and
820 <literal>Numeric.showGFloatAlt</literal>) and
821 <literal>GHC.Float</literal> (added
822 <literal>formatRealFloatAlt</literal>) to support it.
823 The rewritten version is extensible to user types, adds a
824 "generic" format specifier "<literal>%v</literal>",
825 extends the <literal>printf</literal> spec
826 to support much of C's <literal>printf(3)</literal>
827 functionality, and fixes the spurious warnings about
828 using <literal>Text.Printf.printf</literal> at
829 <literal>(IO a)</literal> while ignoring the return value.
830 These changes were contributed by Bart Massey.
831 </para>
832 </listitem>
833 <listitem>
834 <para>
835 The minimal complete definitions for all
836 type-classes with cyclic default implementations
837 have been explicitly annotated with the new
838 <literal>{-# MINIMAL #-}</literal> pragma.
839 </para>
840 </listitem>
841 <listitem>
842 <para>
843 <literal>Control.Applicative.WrappedMonad</literal>,
844 which can be used to convert a <literal>Monad</literal>
845 to an <literal>Applicative</literal>, has now
846 a <literal>Monad m => Monad (WrappedMonad m)</literal>
847 instance.
848 </para>
849 </listitem>
850 </itemizedlist>
851 </sect3>
852
853 <sect3>
854 <title>bin-package-db</title>
855 <itemizedlist>
856 <listitem>
857 <para>
858 This is an internal package, and should not be used.
859 </para>
860 </listitem>
861 </itemizedlist>
862 </sect3>
863
864 <sect3>
865 <title>binary</title>
866 <itemizedlist>
867 <listitem>
868 <para>
869 Version number 0.7.1.0 (was 0.5.1.1)
870 </para>
871 </listitem>
872 </itemizedlist>
873 </sect3>
874
875 <sect3>
876 <title>bytestring</title>
877 <itemizedlist>
878 <listitem>
879 <para>
880 Version number 0.10.4.0 (was 0.10.0.0)
881 </para>
882 </listitem>
883 </itemizedlist>
884 </sect3>
885
886 <sect3>
887 <title>Cabal</title>
888 <itemizedlist>
889 <listitem>
890 <para>
891 Version number 1.18.1.3 (was 1.16.0)
892 </para>
893 </listitem>
894 </itemizedlist>
895 </sect3>
896
897 <sect3>
898 <title>containers</title>
899 <itemizedlist>
900 <listitem>
901 <para>
902 Version number 0.5.4.0 (was 0.5.0.0)
903 </para>
904 </listitem>
905 </itemizedlist>
906 </sect3>
907
908 <sect3>
909 <title>deepseq</title>
910 <itemizedlist>
911 <listitem>
912 <para>
913 Version number 1.3.0.2 (was 1.3.0.1)
914 </para>
915 </listitem>
916 </itemizedlist>
917 </sect3>
918
919 <sect3>
920 <title>directory</title>
921 <itemizedlist>
922 <listitem>
923 <para>
924 Version number 1.2.0.2 (was 1.2.0.1)
925 </para>
926 </listitem>
927 <listitem>
928 <para>
929 The function <literal>findExecutables</literal>
930 now correctly checks to see if the execute bit is
931 set on Linux, rather than just looking in
932 <literal>$PATH</literal>.
933 </para>
934 </listitem>
935 <listitem>
936 <para>
937 There are several new functions for finding files,
938 including <literal>findFiles</literal> and
939 <literal>findFilesWith</literal>, which allow you
940 to search for a file given a set of filepaths, and
941 run a predicate over them.
942 </para>
943 </listitem>
944 </itemizedlist>
945 </sect3>
946
947 <sect3>
948 <title>filepath</title>
949 <itemizedlist>
950 <listitem>
951 <para>
952 Version number 1.3.0.2 (was 1.3.0.1)
953 </para>
954 </listitem>
955 </itemizedlist>
956 </sect3>
957
958 <sect3>
959 <title>ghc-prim</title>
960 <itemizedlist>
961 <listitem>
962 <para>
963 Version number 0.3.1.0 (was 0.3.0.0)
964 </para>
965 </listitem>
966 <listitem>
967 <para>
968 The type-classes <literal>Eq</literal> and
969 <literal>Ord</literal> have been annotated with
970 the new <literal>{-# MINIMAL #-}</literal>
971 pragma.
972 </para>
973 </listitem>
974 <listitem>
975 <para>
976 There is a new type exposed by
977 <literal>GHC.Types</literal>, called
978 <literal>SPEC</literal>, which can be used to
979 inform GHC to perform call-pattern specialisation
980 extremely aggressively. See <xref
981 linkend="options-optimise"/> for more details
982 concerning <literal>-fspec-constr</literal>.
983 </para>
984 </listitem>
985 </itemizedlist>
986 </sect3>
987
988 <sect3>
989 <title>haskell98</title>
990 <itemizedlist>
991 <listitem>
992 <para>
993 Version number 2.0.0.3 (was 2.0.0.2)
994 </para>
995 </listitem>
996 </itemizedlist>
997 </sect3>
998
999 <sect3>
1000 <title>haskell2010</title>
1001 <itemizedlist>
1002 <listitem>
1003 <para>
1004 Version number 1.1.1.1 (was 1.1.1.0)
1005 </para>
1006 </listitem>
1007 </itemizedlist>
1008 </sect3>
1009
1010 <sect3>
1011 <title>hoopl</title>
1012 <itemizedlist>
1013 <listitem>
1014 <para>
1015 Version number 3.10.0.0 (was 3.9.0.0)
1016 </para>
1017 </listitem>
1018 </itemizedlist>
1019 </sect3>
1020
1021 <sect3>
1022 <title>hpc</title>
1023 <itemizedlist>
1024 <listitem>
1025 <para>
1026 Version number 0.6.0.1 (was 0.6.0.0)
1027 </para>
1028 </listitem>
1029 </itemizedlist>
1030 </sect3>
1031
1032 <sect3>
1033 <title>integer-gmp</title>
1034 <itemizedlist>
1035 <listitem>
1036 <para>
1037 Version number 0.5.1.0 (was 0.5.0.0)
1038 </para>
1039 </listitem>
1040 </itemizedlist>
1041 </sect3>
1042
1043 <sect3>
1044 <title>old-locale</title>
1045 <itemizedlist>
1046 <listitem>
1047 <para>
1048 Version number 1.0.0.6 (was 1.0.0.5)
1049 </para>
1050 </listitem>
1051 </itemizedlist>
1052 </sect3>
1053
1054 <sect3>
1055 <title>old-time</title>
1056 <itemizedlist>
1057 <listitem>
1058 <para>
1059 Version number 1.1.0.2 (was 1.1.0.1)
1060 </para>
1061 </listitem>
1062 </itemizedlist>
1063 </sect3>
1064
1065 <sect3>
1066 <title>process</title>
1067 <itemizedlist>
1068 <listitem>
1069 <para>
1070 Version number 1.2.0.0 (was 1.1.0.2)
1071 </para>
1072 </listitem>
1073 <listitem>
1074 <para>
1075 Several bugs have been fixed, including deadlocks
1076 in <literal>readProcess</literal> and
1077 <literal>readProcessWithExitCode</literal>.
1078 </para>
1079 </listitem>
1080 </itemizedlist>
1081 </sect3>
1082
1083 <sect3>
1084 <title>template-haskell</title>
1085 <itemizedlist>
1086 <listitem>
1087 <para>
1088 Version number 2.9.0.0 (was 2.8.0.0)
1089 </para>
1090 </listitem>
1091 <listitem>
1092 <para>
1093 Typed Template Haskell expressions are now
1094 supported. See <xref linkend="template-haskell"/>
1095 for more details.
1096 </para>
1097 </listitem>
1098 <listitem>
1099 <para>
1100 There is now support for roles.
1101 </para>
1102 </listitem>
1103 <listitem>
1104 <para>
1105 There is now support for annotation pragmas.
1106 </para>
1107 </listitem>
1108 </itemizedlist>
1109 </sect3>
1110
1111 <sect3>
1112 <title>time</title>
1113 <itemizedlist>
1114 <listitem>
1115 <para>
1116 Version number 1.4.1 (was 1.4.1)
1117 </para>
1118 </listitem>
1119 </itemizedlist>
1120 </sect3>
1121
1122 <sect3>
1123 <title>unix</title>
1124 <itemizedlist>
1125 <listitem>
1126 <para>
1127 Version number 2.7.0.0 (was 2.6.0.0)
1128 </para>
1129 </listitem>
1130 <listitem>
1131 <para>
1132 A crash in <literal>getGroupEntryForID</literal>
1133 (and related functions like
1134 <literal>getUserEntryForID</literal> and
1135 <literal>getUserEntryForName</literal>) in
1136 multi-threaded applications has been fixed.
1137 </para>
1138 </listitem>
1139 <listitem>
1140 <para>
1141 The functions <literal>getGroupEntryForID</literal>
1142 and <literal>getUserEntryForID</literal> now fail
1143 with a <literal>isDoesNotExist</literal> error when
1144 the specified ID cannot be found.
1145 </para>
1146 </listitem>
1147 </itemizedlist>
1148 </sect3>
1149
1150 <sect3>
1151 <title>Win32</title>
1152 <itemizedlist>
1153 <listitem>
1154 <para>
1155 Version number 2.3.0.0 (was 2.3.0.0)
1156 </para>
1157 </listitem>
1158 </itemizedlist>
1159 </sect3>
1160 </sect2>
1161
1162 <sect2>
1163 <title>Known bugs</title>
1164 <itemizedlist>
1165 <listitem>
1166 <para>
1167 On OS X 10.7 and beyond, with default build settings,
1168 the runtime system currently suffers from a fairly
1169 large (30%) performance regression in the parallel
1170 garbage collector when using
1171 <literal>-threaded</literal> impacting its thoroughput
1172 and overall scalability.
1173 </para>
1174 <para>
1175 This is due to the fact that the OS X 10.7+ toolchain
1176 does not (by default) support register variables, or a
1177 fast <literal>__thread</literal> implementation. Note
1178 that this can be worked around by building GHC using
1179 GCC instead on OS X platforms, but the binary
1180 distribution then requires GCC later.
1181 </para>
1182 </listitem>
1183
1184 <listitem>
1185 <para>
1186 On Windows, <literal>-dynamic-too</literal> is unsupported.
1187 </para>
1188 </listitem>
1189
1190 <listitem>
1191 <para>
1192 On Windows, we currently don't ship dynamic libraries
1193 or use a dynamic GHCi, unlike Linux, FreeBSD or OS X.
1194 </para>
1195 </listitem>
1196
1197 <listitem>
1198 <para>
1199 On 64bit Windows, the static linker currently suffers
1200 from some rather large bugs, which we hope to have
1201 some fixes for soon.
1202 </para>
1203 </listitem>
1204 </itemizedlist>
1205 </sect2>
1206 </sect1>