7.8.1-notes.xml 45.6 KB
Newer Older
1
2
3
4
5
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="release-7-8-1">
  <title>Release notes for version 7.8.1</title>

  <para>
thoughtpolice's avatar
thoughtpolice committed
6
7
8
      The significant changes to the various parts of the compiler are listed
      in the following sections. There have also been numerous bug fixes and
      performance improvements over the 7.6 branch.
9
10
11
12
13
14
15
16
17
18
  </para>

  <sect2>
    <title>Highlights</title>

    <para>
        The highlights, since the 7.6 branch, are:
    </para>

    <itemizedlist>
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
        <listitem>
            <para>
                OS X Mavericks with XCode 5 is now properly supported
                by GHC. As a result of this, GHC now uses Clang to
                preprocess Haskell code by default for Mavericks
                builds.
           </para>

            <para>
                Note that normally, GHC used <literal>gcc</literal> as
                the preprocessor for Haskell code (as it was the
                default everywhere,) which implements
                <literal>-traditional</literal> behavior. However,
                Clang is not 100% compatible with GCC's
                <literal>-traditional</literal> as it is rather
                implementation specified and does not match any
                specification. Clang is also more strict.
           </para>

            <para>
                As a result of this, when using Clang as the
                preprocessor, some programs which previously used
                <literal>-XCPP</literal> and the preprocessor will now
                fail to compile. Users who wish to retain the previous
                behavior are better off using cpphs as an external
                preprocessor for the time being.
           </para>

            <para>
                In the future, we hope to fix this by adopting a
                better preprocessor implementation independent of the
                C compiler (perhaps cpphs itself,) and ship that
                instead.
           </para>
       </listitem>

thoughtpolice's avatar
thoughtpolice committed
55
56
        <listitem>
            <para>
57
                By default, GHC has a new warning enabled,
58
                <literal>-fwarn-typed-holes</literal>, which causes the
59
60
61
62
                compiler to respond with the types of unbound
                variables it encounters in the source code. (It is
                reminiscient of the "holes" feature in languages such
                as Agda.)
thoughtpolice's avatar
thoughtpolice committed
63

64
                For more information, see <xref linkend="typed-holes"/>.
thoughtpolice's avatar
thoughtpolice committed
65
66
67
           </para>
       </listitem>

68
69
70
71
        <listitem>
            <para>
                GHC can now perform simple evaluation of type-level
                natural numbers, when using the
72
                <literal>DataKinds</literal> extension. For example,
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
                given a type-level constraint such as <literal>(x + 3)
                ~ 5</literal>, GHC is able to infer that
                <literal>x</literal> is 2. Similarly, GHC can now
                understand type-level identities such as <literal>x +
                0 ~ x</literal>.
           </para>

            <para>
                Note that the solving of these equations is only used
                to resolve unification variables - it does not
                generate new facts in the type checker. This is
                similar to how functional dependencies work.
           </para>
       </listitem>

thoughtpolice's avatar
thoughtpolice committed
88
89
        <listitem>
            <para>
thoughtpolice's avatar
thoughtpolice committed
90
91
92
93
94
95
                It is now possible to declare a 'closed' <literal>type
                family</literal> when using the
                <literal>TypeFamilies</literal> extension. A closed
                <literal>type family</literal> cannot have any
                instances created other than the ones in its
                definition.
thoughtpolice's avatar
thoughtpolice committed
96

Austin Seipp's avatar
Austin Seipp committed
97
                For more information, see <xref linkend="closed-type-families"/>.
thoughtpolice's avatar
thoughtpolice committed
98
99
100
           </para>
       </listitem>

101
102
103
104
105
106
107
108
       <listitem>
           <para>
                Use of the <literal>GeneralizedNewtypeDeriving</literal>
                extension is now subject to <emphasis>role checking</emphasis>,
                to ensure type safety of the derived instances. As this change
                increases the type safety of GHC, it is possible that some code
                that previously compiled will no longer work.

Austin Seipp's avatar
Austin Seipp committed
109
                For more information, see <xref linkend="roles"/>.
110
111
112
113
114
115
          </para>
           <para>
                As a result of this change,
                <literal>GeneralizedNewtypeDeriving</literal> can now
                be used with Safe Haskell.
          </para>
116
       </listitem>
thoughtpolice's avatar
thoughtpolice committed
117

thoughtpolice's avatar
thoughtpolice committed
118
119
        <listitem>
            <para>
thoughtpolice's avatar
thoughtpolice committed
120
121
                GHC now supports overloading list literals using the new
                <literal>OverloadedLists</literal> extension.
thoughtpolice's avatar
thoughtpolice committed
122

Austin Seipp's avatar
Austin Seipp committed
123
                For more information, see <xref linkend="overloaded-lists"/>.
thoughtpolice's avatar
thoughtpolice committed
124
125
126
           </para>
       </listitem>

127
128
129
        <listitem>
            <para>
                GHC now supports pattern synonyms, enabled by the
Gabor Greif's avatar
Gabor Greif committed
130
                <literal>-XPatternSynonyms</literal> extension,
131
132
133
                allowing you to name and abstract over patterns more
                easily.

134
135
136
137
138
                For more information, see <xref linkend="pattern-synonyms"/>.
           </para>
           <para>
                Note: For the GHC 7.8.1 version, this language feature
                should be regarded as a preview.
139
140
141
           </para>
       </listitem>

thoughtpolice's avatar
thoughtpolice committed
142
143
        <listitem>
            <para>
Austin Seipp's avatar
Austin Seipp committed
144
145
                There has been significant overhaul of the type
                inference engine and constraint solver, meaning it
Austin Seipp's avatar
Austin Seipp committed
146
                should be faster and use less memory.
thoughtpolice's avatar
thoughtpolice committed
147
148
149
150
151
           </para>
       </listitem>

        <listitem>
            <para>
thoughtpolice's avatar
thoughtpolice committed
152
153
154
155
156
157
                By default, GHC will now unbox all "small" strict
                fields in a data type. A "small" data type is one
                whose size is equivalent to or smaller than the native
                word size of the machine. This means you no longer
                have to specify <literal>UNPACK</literal> pragmas for
                e.g. strict <literal>Int</literal> fields. This also
thoughtpolice's avatar
thoughtpolice committed
158
159
160
161
162
163
164
165
166
167
168
169
170
171
                applies to floating-point values.
           </para>
       </listitem>

        <listitem>
            <para>
                GHC now has a brand-new I/O manager that scales significantly
                better for larger workloads compared to the previous one. It
                should scale linearly up to approximately 32 cores.
           </para>
       </listitem>

        <listitem>
            <para>
172
173
                The LLVM backend now supports 128- and 256-bit SIMD
                operations.
thoughtpolice's avatar
thoughtpolice committed
174
175
           </para>
            <para>
Austin Seipp's avatar
Austin Seipp committed
176
                Note carefully: this is <emphasis>only</emphasis> available with
Austin Seipp's avatar
Austin Seipp committed
177
178
                the LLVM backend, and should be considered
                experimental.
thoughtpolice's avatar
thoughtpolice committed
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
           </para>
       </listitem>

        <listitem>
            <para>
                The new code generator, after significant work by many
                individuals over the past several years, is now enabled by
                default. This is a complete rewrite of the STG to Cmm
                transformation. In general, your programs may get slightly
                faster.
           </para>

            <para>
                The old code generator has been removed completely.
           </para>
       </listitem>

196
197
198
199
200
201
202
203
204
        <listitem>
            <para>
                GHC now has substantially better support for cross
                compilation. In particular, GHC now has all the
                necessary patches to support cross compilation to
                Apple iOS, using the LLVM backend.
           </para>
       </listitem>

205
206
207
208
        <listitem>
            <para>
                PrimOps for comparing unboxed values now return
                <literal>Int#</literal> instead of <literal>Bool</literal>.
209
                This change is backwards incompatible. See
210
211
                <ulink url="http://ghc.haskell.org/trac/ghc/wiki/NewPrimopsInGHC7.8">
                this GHC wiki page</ulink> for instructions how to update your
212
213
                existing code. See <ulink url="http://ghc.haskell.org/trac/ghc/wiki/PrimBool">
                here</ulink> for motivation and discussion of implementation details.
214
215
216
           </para>
       </listitem>

217
        <listitem>
Austin Seipp's avatar
Austin Seipp committed
218
            <para>
219
220
                New PrimOps for atomic memory operations.
                The <literal>casMutVar#</literal> PrimOp was introduced in
Austin Seipp's avatar
Austin Seipp committed
221
222
223
                GHC 7.2 (debugged in 7.4).  This release also includes additional
                PrimOps for compare-and-swap (<literal>casArray#</literal> and
                <literal>casIntArray#</literal>) and one for fetch-and-add
224
225
226
227
                (<literal>fetchAddIntArray#</literal>).
           </para>
       </listitem>

thoughtpolice's avatar
thoughtpolice committed
228
229
        <listitem>
            <para>
Austin Seipp's avatar
Austin Seipp committed
230
231
232
                On Linux, FreeBSD and Mac OS X, GHCi now uses the
                system dynamic linker by default, instead of its built
                in (static) object linker. This is more robust
Austin Seipp's avatar
Austin Seipp committed
233
                cross-platform, and fixes many long-standing bugs (for
Austin Seipp's avatar
Austin Seipp committed
234
235
236
                example: constructors and destructors, weak symbols,
                etc work correctly, and several edge cases in the RTS
                are fixed.)
Austin Seipp's avatar
Austin Seipp committed
237
238
239
240
           </para>

            <para>
                As a result of this, GHCi (and Template Haskell) must
Austin Seipp's avatar
Austin Seipp committed
241
                now load <emphasis>dynamic</emphasis> object files, not static
Austin Seipp's avatar
Austin Seipp committed
242
243
244
245
246
247
248
249
250
251
252
                ones. To assist this, there is a new compilation flag,
                <literal>-dynamic-too</literal>, which when used
                during compilation causes GHC to emit both static and
                dynamic object files at the same time. GHC itself
                still defaults to static linking.
            </para>

            <para>
                Note that Cabal will correctly handle
                <literal>-dynamic-too</literal> for you automatically,
                especially when <literal>-XTemplateHaskell</literal>
Austin Seipp's avatar
Austin Seipp committed
253
                is needed - but you <emphasis>must</emphasis> tell Cabal you are
Austin Seipp's avatar
Austin Seipp committed
254
255
256
257
                using the <literal>TemplateHaskell</literal>
                extension.
           </para>

258
259
260
261
262
263
            <para>
                Note that you must be using Cabal and Cabal-install
                1.18 for it to correctly build dynamic shared libraries
                for you.
           </para>

Austin Seipp's avatar
Austin Seipp committed
264
265
266
267
            <para>
                Currently, Dynamic GHCi and
                <literal>-dynamic-too</literal> are not supported on
                Windows (32bit or 64bit.)
thoughtpolice's avatar
thoughtpolice committed
268
269
270
271
272
           </para>
       </listitem>

        <listitem>
            <para>
273
274
275
276
277
278
279
280
281
                <literal>Typeable</literal> is now poly-kinded, making
                <literal>Typeable1</literal>, <literal>Typeable2</literal>,
                etc., obsolete, deprecated, and relegated to
                <literal>Data.OldTypeable</literal>. Furthermore, user-written
                instances of <literal>Typeable</literal> are now disallowed:
                use <literal>deriving</literal> or the new extension
                <literal>-XAutoDeriveTypeable</literal>, which will create
                <literal>Typeable</literal> instances for every datatype
                declared in the module.
thoughtpolice's avatar
thoughtpolice committed
282
283
           </para>
       </listitem>
284
285
286

        <listitem>
            <para>
287
                GHC now has a parallel compilation driver. When
288
289
290
                compiling with <literal>--make</literal> (which is on
                by default,) you may also specify
                <literal>-jN</literal> in order to compile
Austin Seipp's avatar
Austin Seipp committed
291
292
293
294
                <replaceable>N</replaceable> modules in
                parallel. (Note: this will automatically scale on
                multicore machines without specifying <literal>+RTS
                -N</literal> to the compiler.)
295
296
           </para>
       </listitem>
297

298
299
300
301
302
303
304
        <listitem>
            <para>
                GHC now has support for a new pragma,
                <literal>{-# MINIMAL #-}</literal>, allowing you to
                explicitly declare the minimal complete definition of
                a class. Should an instance not provide the minimal
                required definitions, a warning will be emitted.
305
                See <xref linkend="minimal-pragma"/> for details.
306
307
308
           </para>
       </listitem>

309
310
        <listitem>
            <para>
Austin Seipp's avatar
Austin Seipp committed
311
312
313
314
315
316
                In GHC 7.10, <literal>Applicative</literal> will
                become a superclass of <literal>Monad</literal>,
                potentially breaking a lot of user code. To ease this
                transition, GHC now generates warnings when
                definitions conflict with the Applicative-Monad
                Proposal (AMP).
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
           </para>

            <para>
                A warning is emitted if a type is an instance of
                <literal>Monad</literal> but not of
                <literal>Applicative</literal>,
                <literal>MonadPlus</literal> but not
                <literal>Alternative</literal>, and when a local
                function named <literal>join</literal>,
                <literal>&lt;*&gt;</literal> or <literal>pure</literal> is
                defined.
           </para>

            <para>
                The warnings are enabled by default, and can be controlled
                using the new flag <literal>-f[no-]warn-amp</literal>.
           </para>
       </listitem>
Austin Seipp's avatar
Austin Seipp committed
335
336
337
338
339
340
341
342
343
344

        <listitem>
            <para>
                Using the new <literal>InterruptibleFFI</literal>
                extension, it's possible to now declare a foreign
                import as <literal>interruptible</literal>, as opposed
                to only <literal>safe</literal> or
                <literal>unsafe</literal>. An
                <literal>interruptible</literal> foreign call is the
                same as a <literal>safe</literal> call, but may be
Austin Seipp's avatar
Austin Seipp committed
345
346
                interrupted by asynchronous <emphasis>Haskell
                exceptions</emphasis>, such as those generated by
Austin Seipp's avatar
Austin Seipp committed
347
348
349
350
351
                <literal>throwTo</literal> or
                <literal>timeout</literal>.
           </para>

            <para>
Austin Seipp's avatar
Austin Seipp committed
352
                For more information (including the exact details on
Austin Seipp's avatar
Austin Seipp committed
353
                how the foreign thread is interrupted,) see <xref
Austin Seipp's avatar
Austin Seipp committed
354
                linkend="ffi-interruptible"/>.
Austin Seipp's avatar
Austin Seipp committed
355
356
357
           </para>
       </listitem>

358
359
360
361
362
363
364
365
366
367
368
        <listitem>
            <para>
                GHC's internal compiler pipeline is now exposed
                through a <literal>Hooks</literal> module inside the
                GHC API. These hooks allow you to control most of the
                internal compiler phase machinery, including compiling
                expressions, phase control, and linking.
           </para>

            <para>
                Note: this interface will likely see continuous
Krzysztof Gogolewski's avatar
Krzysztof Gogolewski committed
369
                refinement and API changes in future releases, so it
370
371
372
                should be considered a preview.
           </para>
       </listitem>
373
374
375
376
377
378
379
       <listitem>
           <para>
                The LLVM code generator has been fixed to support
                dynamic linking. This enables runtime-linking
                (e.g. GHCi) support for architectures without support in
                GHC's own runtime linker (e.g. ARM).
           </para>
380
381
382
383
384
385
           <para>
                Note: Tables-next-to-code is disabled when building on
                ARM with binutil's ld due to a
                <ulink url="https://sourceware.org/bugzilla/show_bug.cgi?id=16177">
                bug</ulink> in ld.
           </para>
386
       </listitem>
thoughtpolice's avatar
thoughtpolice committed
387
388
389
390
391
392
393
394
395
396
   </itemizedlist>
  </sect2>

  <sect2>
    <title>Full details</title>
    <sect3>
        <title>Language</title>
        <itemizedlist>
            <listitem>
                <para>
thoughtpolice's avatar
thoughtpolice committed
397
398
399
400
                    There is a new extension,
                    <literal>NullaryTypeClasses</literal>, which
                    allows you to declare a type class without any
                    parameters.
401
402
403
404
405
406
407
408
409
410
411
412
413
               </para>
           </listitem>
       </itemizedlist>

        <itemizedlist>
            <listitem>
                <para>
                    There is a new extension,
                    <literal>NumDecimals</literal>, which allows you
                    to specify an integer using compact "floating
                    literal" syntax. This lets you say things like
                    <literal>1.2e6 :: Integer</literal> instead of
                    <literal>1200000</literal>
thoughtpolice's avatar
thoughtpolice committed
414
415
416
               </para>
           </listitem>
       </itemizedlist>
417
418
419
420
421
422
423
424
425
426
427
428
429
430

        <itemizedlist>
            <listitem>
                <para>
                    There is a new extension,
                    <literal>NegativeLiterals</literal>, which will
                    cause GHC to interpret the expression
                    <literal>-123</literal> as <literal>fromIntegral
                    (-123)</literal>. Haskell 98 and Haskell 2010 both
                    specify that it should instead desugar to
                    <literal>negate (fromIntegral 123)</literal>
               </para>
           </listitem>
       </itemizedlist>
431

432
433
434
435
436
437
438
439
440
441
442
        <itemizedlist>
            <listitem>
                <para>
                    There is a new extension,
                    <literal>EmptyCase</literal>, which allows
                    to write a case expression with no alternatives
                    <literal>case ... of {}</literal>.
               </para>
           </listitem>
       </itemizedlist>

443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
        <itemizedlist>
            <listitem>
                <para>
                     The <literal>IncoherentInstances</literal>
                     extension has seen a behavioral change, and is
                     now 'liberated' and less conservative during
                     instance resolution. This allows more programs to
                     compile than before.
               </para>
                <para>
                     Now, <literal>IncoherentInstances</literal> will
                     always pick an arbitrary matching instance, if
                     multiple ones exist.
               </para>
           </listitem>
       </itemizedlist>

460
461
462
463
464
465
466
467
        <itemizedlist>
            <listitem>
                <para>
                     A new built-in function <literal>coerce</literal> is
                     provided that allows to safely coerce values between types
                     that have the same run-time-presentation, such as
                     newtypes, but also newtypes inside containers. See the
                     haddock documentation of
468
                     <ulink url="&libraryBaseLocation;/Data-Coerce.html#v%3Acoerce">coerce</ulink>
469
                     and of the class
470
                     <ulink url="&libraryBaseLocation;/Data-Coerce.html#t%3ACoercible">Coercible</ulink>
471
472
473
474
475
476
477
478
479
480
                     for more details.
               </para>
                <para>
                     This feature is included in this release as a technology
                     preview, and may change its syntax and/or semantics in the
                     next release.
               </para>
           </listitem>
       </itemizedlist>

481
482
483
484
485
486
487
488
489
        <itemizedlist>
            <listitem>
                <para>
                     The new pragma, <literal>{-# MINIMAL #-}</literal>,
                     allows to explicitly declare the minimal complete
                     definition of a class. Should an instance not provide
                     the minimal required definitions, a warning will be
                     emitted.
               </para>
490

491
492
493
494
495
                <para>
                     See <xref linkend="minimal-pragma"/> for more details.
               </para>
           </listitem>
       </itemizedlist>
thoughtpolice's avatar
thoughtpolice committed
496
497
498
499
500
    </sect3>

    <sect3>
        <title>Compiler</title>
        <itemizedlist>
501
502
503
504
505
506
507
508
509
510
511
            <listitem>
                <para>
                    GHC can now build both static and dynamic object
                    files at the same time in a single compilation
                    pass, when given the
                    <literal>-dynamic-too</literal> flag. This will
                    produce both a statically-linkable
                    <literal>.o</literal> object file, and a
                    dynamically-linkable <literal>.dyn_o</literal>
                    file. The output suffix of the dynamic objects can
                    be controlled by the flag
512
                    <literal>-dynosuf</literal>.
513
514
515
516
517
518
               </para>

                <para>
                    Note that GHC still builds statically by default.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
519
520
            <listitem>
                <para>
521
522
523
                    GHC now supports a
                    <literal>--show-options</literal> flag, which will
                    dump all of the flags it supports to standard out.
thoughtpolice's avatar
thoughtpolice committed
524
               </para>
525
526
527
528
529
530
           </listitem>
            <listitem>
                <para>
                    GHC now supports warning about overflow of integer
                    literals, enabled by
                    <literal>-fwarn-overflowed-literals</literal>. It
Austin Seipp's avatar
Wibble.    
Austin Seipp committed
531
                    is enabled by default.
532
               </para>
thoughtpolice's avatar
thoughtpolice committed
533
           </listitem>
534
535
536
537
538
539
            <listitem>
                <para>
                    It's now possible to switch the system linker on Linux
                    (between GNU gold and GNU ld) at runtime without problem.
               </para>
           </listitem>
540
541
542
543
544
545
546
            <listitem>
                <para>
                    The <literal>-fwarn-dodgy-imports</literal> flag now warns
                    in the case an <literal>import</literal> statement hides an
                    entity which is not exported.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
547
548
549
550
551
552
553
            <listitem>
                <para>
                    The LLVM backend was overhauled and rewritten, and
                    should hopefully be easier to maintain and work on
                    in the future.
               </para>
           </listitem>
Austin Seipp's avatar
Austin Seipp committed
554
555
            <listitem>
                <para>
Austin Seipp's avatar
Austin Seipp committed
556
557
558
                    GHC now detects annotation changes during
                    recompilation, and correctly persists new
                    annotations.
Austin Seipp's avatar
Austin Seipp committed
559
560
561
562
563
564
               </para>
           </listitem>
            <listitem>
                <para>
                    There is a new set of primops for utilizing
                    hardware-based prefetch instructions, to help
Gabor Greif's avatar
Gabor Greif committed
565
                    guide the processor's caching decisions.
Austin Seipp's avatar
Austin Seipp committed
566
567
               </para>
                <para>
568
569
570
571
572
573
                    Currently, the primops get translated into
                    the associated hardware supported prefetch
                    instructions only with the LLVM backend and
                    x86/amd64 backends. On all other backends,
                    the prefetch primops are currently erased
                    at code generation time.
Austin Seipp's avatar
Austin Seipp committed
574
575
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
576
577
578
579
580
581
       </itemizedlist>
    </sect3>

    <sect3>
        <title>GHCi</title>
        <itemizedlist>
582
583
584
585
586
            <listitem>
                    The monomorphism restriction is now turned off
                    by default in GHCi.
            </listitem>
         
thoughtpolice's avatar
thoughtpolice committed
587
588
            <listitem>
                <para>
thoughtpolice's avatar
thoughtpolice committed
589
590
591
592
                    GHCi now supports a <literal>prompt2</literal>
                    setting, which allows you to customize the
                    continuation prompt of multi-line input.

Austin Seipp's avatar
Austin Seipp committed
593
                    For more information, see <xref linkend="ghci-commands"/>.
thoughtpolice's avatar
thoughtpolice committed
594
595
               </para>
           </listitem>
596
597
598
599
600
601
602
           <listitem>
                <para>
                    The new <literal>:shows paths</literal> command
                    shows the current working directory and the
                    current search path for Haskell modules.
               </para>
           </listitem>
Austin Seipp's avatar
Austin Seipp committed
603

604
605
606
607
608
609
           <listitem>
                <para>
                    On Linux, the static GHCi linker now supports weak symbols.
               </para>
           </listitem>

Austin Seipp's avatar
Austin Seipp committed
610
611
            <listitem>
                <para>
612
613
614
                    The (static) GHCi linker (except 64-bit Windows) now runs
                    constructors for linked libraries. This means for example
                    that C code using
Austin Seipp's avatar
Austin Seipp committed
615
616
617
618
619
620
621
622
                    <literal>__attribute__((constructor))</literal>
                    can now properly be loaded into GHCi.
               </para>

                <para>
                    Note: destructors are not supported.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
623
624
625
626
627
628
629
630
       </itemizedlist>
    </sect3>

    <sect3>
        <title>Template Haskell</title>
        <itemizedlist>
            <listitem>
                <para>
Austin Seipp's avatar
Austin Seipp committed
631
                    Template Haskell now supports Roles.
Austin Seipp's avatar
Austin Seipp committed
632
633
634
635
636
               </para>
           </listitem>
            <listitem>
                <para>
                    Template Haskell now supports annotation pragmas.
thoughtpolice's avatar
thoughtpolice committed
637
638
               </para>
           </listitem>
639
640
641
642
643
644
645
646
647
648
649
650
651
652
           <listitem>
             <para>
                    Typed Template Haskell expressions are now supported. See
                    <xref linkend="template-haskell"/> for more details.
             </para>
           </listitem>
           <listitem>
             <para>
                    Template Haskell declarations, types, patterns, and
                    <emphasis>untyped</emphasis> expressions are no longer
                    typechecked at all. This is a backwards-compatible change
                    since it allows strictly more programs to be typed.
             </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
653
654
655
656
657
658
       </itemizedlist>
    </sect3>

    <sect3>
        <title>Runtime system</title>
        <itemizedlist>
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
            <listitem>
                <para>
                    The RTS linker can now unload object code at
                    runtime (when using the GHC API
                    <literal>ObjLink</literal> module.) Previously,
                    GHC would not unload the old object file, causing
                    a gradual memory leak as more objects were loaded
                    over time.
               </para>

                <para>
                    Note that this change in unloading behavior
                    <emphasis>only</emphasis> affects statically
                    linked binaries, and not dynamic ones.
               </para>
           </listitem>

thoughtpolice's avatar
thoughtpolice committed
676
677
678
679
680
681
            <listitem>
                <para>
                    The performance of <literal>StablePtr</literal>s and
                    <literal>StableName</literal>s has been improved.
               </para>
           </listitem>
682
683
684
685
686
687
688
689

            <listitem>
                <para>
                    The default maximum stack size has
                    increased. Previously, it defaulted to 8m
                    (equivalent to passing <literal>+RTS
                    -K8m</literal>. Now, GHC will use up-to 80% of the
                    <emphasis>physical memory</emphasis> available at
Austin Seipp's avatar
Austin Seipp committed
690
                    runtime.
691
692
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
693
694
695
696
697
698
699
700
701
702
703
       </itemizedlist>
    </sect3>

    <sect3>
        <title>Build system</title>
        <itemizedlist>
            <listitem>
                <para>
                    GHC >= 7.4 is now required for bootstrapping.
               </para>
           </listitem>
704
705
            <listitem>
                <para>
706
707
708
                    GHC can now be built with Clang, and use Clang as
                    the preprocessor for Haskell code. Only Clang
                    version 3.4 (or Apple LLVM Clang 5.0) or beyond is
709
710
                    reliably supported.
               </para>
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728

                <para>
                    Note that normally, GHC uses
                    <literal>gcc</literal> as the preprocessor for
                    Haskell code, which implements
                    <literal>-traditional</literal> behavior. However,
                    Clang is not 100% compatible with GCC's
                    <literal>-traditional</literal> as it is rather
                    implementation specified, and is more strict.
               </para>

                <para>
                    As a result of this, when using Clang as the
                    preprocessor, some programs which previously used
                    <literal>-XCPP</literal> and the preprocessor will
                    now fail to compile. Users who wish to retain the
                    previous behavior are better off using cpphs.
               </para>
729
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
730
731
732
733
734
735
736
737
738
739
740
741
       </itemizedlist>
    </sect3>
  </sect2>

  <sect2>
    <title>Libraries</title>

    <sect3>
        <title>array</title>
        <itemizedlist>
            <listitem>
                <para>
Austin Seipp's avatar
Austin Seipp committed
742
                    Version number 0.5.0.0 (was 0.4.0.1)
thoughtpolice's avatar
thoughtpolice committed
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>base</title>
        <itemizedlist>
            <listitem>
                <para>
                    Version number 4.7.0.0 (was 4.6.0.1)
               </para>
           </listitem>
            <listitem>
                <para>
                    The <literal>Control.Category</literal> module now has the
                    <literal>PolyKinds</literal> extension enabled, meaning
                    that instances of <literal>Category</literal> no longer
761
                    need be of kind <literal>* -> * -> *</literal>.
thoughtpolice's avatar
thoughtpolice committed
762
763
764
765
766
               </para>
           </listitem>
            <listitem>
                <para>
                    There are now <literal>Foldable</literal> and <literal>Traversable</literal>
767
                    instances for <literal>Either a</literal>, <literal>Const r</literal>, and <literal>(,) a</literal>.
thoughtpolice's avatar
thoughtpolice committed
768
769
               </para>
           </listitem>
770
            <listitem>
771
                <para>
772
                    There is now a <literal>Monoid</literal> instance for <literal>Const</literal>.
773
774
775
               </para>
           </listitem>
             <listitem>
776
                <para>
777
778
                    There is now a <literal>Data</literal> instance for <literal>Data.Version</literal>.
               </para>
779
780
781
782
783
784
785
786
787
788
789
790
791
792
           </listitem>
             <listitem>
                <para>
                    There are now <literal>Data</literal>,
                    <literal>Typeable</literal>, and
                    <literal>Generic</literal> instances for the types
                    in <literal>Data.Monoid</literal> and
                    <literal>Control.Applicative</literal>
               </para>
           </listitem>
             <listitem>
                <para>
                    There are now <literal>Num</literal> instances for <literal>Data.Monoid.Product</literal> and <literal>Data.Monoid.Sum</literal>
               </para>
793
794
795
796
797
798
799
800
801
802
803
804
805
806
           </listitem>
             <listitem>
                <para>
                    There are now <literal>Eq</literal>, <literal>Ord</literal>, <literal>Show</literal> and <literal>Read</literal> instances for <literal>ZipList</literal>.
               </para>
           </listitem>
             <listitem>
                <para>
                    There are now <literal>Eq</literal>, <literal>Ord</literal>, <literal>Show</literal> and <literal>Read</literal> instances for <literal>Down</literal>.
               </para>
           </listitem>
             <listitem>
                <para>
                    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>).
807
               </para>
808
809
810
811
812
813
814
815
           </listitem>
            <listitem>
                <para>
                    A zero-width unboxed poly-kinded <literal>Proxy#</literal>
                    was added to <literal>GHC.Prim</literal>. It can be used to make it so
                    that there is no the operational overhead for passing around proxy
                    arguments to model type application.
               </para>
816
817
           </listitem>
             <listitem>
818
                <para>
819
820
821
822
823
824
825
826
827
828
                    <literal>Control.Concurrent.MVar</literal> has a new
                    implementation of <literal>readMVar</literal>, which
                    fixes a long-standing bug where
                    <literal>readMVar</literal> is only atomic if there
                    are no other threads running
                    <literal>putMVar</literal>.
                    <literal>readMVar</literal> now is atomic, and is
                    guaranteed to return the value from the first
                    <literal>putMVar</literal>.  There is also a new <literal>tryReadMVar</literal>
                    which is a non-blocking version.
829
830
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
831
832
833
834
835
836
837
            <listitem>
                <para>
                    There are now byte endian-swapping primitives
                    available in <literal>Data.Word</literal>, which
                    use optimized machine instructions when available.
               </para>
           </listitem>
838
839
840
            <listitem>
                <para>
                    <literal>Data.Bool</literal> now exports
841
                    <literal>bool :: a -> a -> Bool -> a</literal>, analogously
842
843
844
845
                    to <literal>maybe</literal> and <literal>either</literal>
                    in their respective modules.
               </para>
           </listitem>
846
847
848
849
850
851
852
853
            <listitem>
                <para>
                     Rewrote portions of <literal>Text.Printf</literal>, and
                     made changes to <literal>Numeric</literal> (added
                     <literal>Numeric.showFFloatAlt</literal> and
                     <literal>Numeric.showGFloatAlt</literal>) and
                     <literal>GHC.Float</literal> (added
                     <literal>formatRealFloatAlt</literal>) to support it.
Gabor Greif's avatar
Gabor Greif committed
854
                     The rewritten version is extensible to user types, adds a
855
856
                     "generic" format specifier "<literal>%v</literal>",
                     extends the <literal>printf</literal> spec
Gabor Greif's avatar
Gabor Greif committed
857
858
                     to support much of C's <literal>printf(3)</literal>
                     functionality, and fixes the spurious warnings about
859
                     using <literal>Text.Printf.printf</literal> at
Gabor Greif's avatar
Gabor Greif committed
860
861
                     <literal>(IO a)</literal> while ignoring the return value.
                     These changes were contributed by Bart Massey.
862
863
               </para>
           </listitem>
864
865
866
867
868
869
870
871
            <listitem>
                <para>
                     The minimal complete definitions for all
                     type-classes with cyclic default implementations
                     have been explicitly annotated with the new
                     <literal>{-# MINIMAL #-}</literal> pragma.
               </para>
           </listitem>
872
873
874
875
876
877
878
879
880
            <listitem>
                <para>
                     <literal>Control.Applicative.WrappedMonad</literal>,
                     which can be used to convert a <literal>Monad</literal>
                     to an <literal>Applicative</literal>, has now
                     a <literal>Monad m => Monad (WrappedMonad m)</literal>
                     instance.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
       </itemizedlist>
    </sect3>

    <sect3>
        <title>bin-package-db</title>
        <itemizedlist>
            <listitem>
                <para>
                    This is an internal package, and should not be used.
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>binary</title>
        <itemizedlist>
            <listitem>
                <para>
Austin Seipp's avatar
Austin Seipp committed
900
                    Version number 0.7.1.0 (was 0.5.1.1)
thoughtpolice's avatar
thoughtpolice committed
901
902
903
904
905
906
907
908
909
910
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>bytestring</title>
        <itemizedlist>
            <listitem>
                <para>
Austin Seipp's avatar
Austin Seipp committed
911
                    Version number 0.10.4.0 (was 0.10.0.0)
thoughtpolice's avatar
thoughtpolice committed
912
913
914
915
916
917
918
919
920
921
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>Cabal</title>
        <itemizedlist>
            <listitem>
                <para>
Austin Seipp's avatar
Austin Seipp committed
922
                    Version number 1.18.1.3 (was 1.16.0)
thoughtpolice's avatar
thoughtpolice committed
923
924
925
926
927
928
929
930
931
932
              </para>
          </listitem>
      </itemizedlist>
    </sect3>

    <sect3>
        <title>containers</title>
        <itemizedlist>
            <listitem>
                <para>
Austin Seipp's avatar
Austin Seipp committed
933
                    Version number 0.5.4.0 (was 0.5.0.0)
thoughtpolice's avatar
thoughtpolice committed
934
935
936
937
938
939
940
941
942
943
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>deepseq</title>
        <itemizedlist>
            <listitem>
                <para>
944
                    Version number 1.3.0.2 (was 1.3.0.1)
thoughtpolice's avatar
thoughtpolice committed
945
946
947
948
949
950
951
952
953
954
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>directory</title>
        <itemizedlist>
            <listitem>
                <para>
955
                    Version number 1.2.0.2 (was 1.2.0.1)
thoughtpolice's avatar
thoughtpolice committed
956
957
               </para>
           </listitem>
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
            <listitem>
                <para>
                    The function <literal>findExecutables</literal>
                    now correctly checks to see if the execute bit is
                    set on Linux, rather than just looking in
                    <literal>$PATH</literal>.
               </para>
           </listitem>
            <listitem>
                <para>
                    There are several new functions for finding files,
                    including <literal>findFiles</literal> and
                    <literal>findFilesWith</literal>, which allow you
                    to search for a file given a set of filepaths, and
                    run a predicate over them.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
975
976
977
978
979
980
981
982
       </itemizedlist>
    </sect3>

    <sect3>
        <title>filepath</title>
        <itemizedlist>
            <listitem>
                <para>
983
                    Version number 1.3.0.2 (was 1.3.0.1)
thoughtpolice's avatar
thoughtpolice committed
984
985
986
987
988
989
990
991
992
993
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>ghc-prim</title>
        <itemizedlist>
            <listitem>
                <para>
994
                    Version number 0.3.1.0 (was 0.3.0.0)
thoughtpolice's avatar
thoughtpolice committed
995
996
               </para>
           </listitem>
997
998
999
1000
1001
1002
1003
1004
            <listitem>
                <para>
                     The type-classes <literal>Eq</literal> and
                     <literal>Ord</literal> have been annotated with
                     the new <literal>{-# MINIMAL #-}</literal>
                     pragma.
               </para>
           </listitem>
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
            <listitem>
                <para>
                    There is a new type exposed by
                    <literal>GHC.Types</literal>, called
                    <literal>SPEC</literal>, which can be used to
                    inform GHC to perform call-pattern specialisation
                    extremely aggressively. See <xref
                    linkend="options-optimise"/> for more details
                    concerning <literal>-fspec-constr</literal>.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
1016
1017
1018
1019
1020
1021
1022
1023
       </itemizedlist>
    </sect3>

    <sect3>
        <title>haskell98</title>
        <itemizedlist>
            <listitem>
                <para>
1024
                    Version number 2.0.0.3 (was 2.0.0.2)
thoughtpolice's avatar
thoughtpolice committed
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>haskell2010</title>
        <itemizedlist>
            <listitem>
                <para>
1035
                    Version number 1.1.1.1 (was 1.1.1.0)
thoughtpolice's avatar
thoughtpolice committed
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>hoopl</title>
        <itemizedlist>
            <listitem>
                <para>
1046
                    Version number 3.10.0.0 (was 3.9.0.0)
thoughtpolice's avatar
thoughtpolice committed
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>hpc</title>
        <itemizedlist>
            <listitem>
                <para>
1057
                    Version number 0.6.0.1 (was 0.6.0.0)
thoughtpolice's avatar
thoughtpolice committed
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>integer-gmp</title>
        <itemizedlist>
            <listitem>
                <para>
1068
                    Version number 0.5.1.0 (was 0.5.0.0)
thoughtpolice's avatar
thoughtpolice committed
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>old-locale</title>
        <itemizedlist>
            <listitem>
                <para>
1079
                    Version number 1.0.0.6 (was 1.0.0.5)
thoughtpolice's avatar
thoughtpolice committed
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>old-time</title>
        <itemizedlist>
            <listitem>
                <para>
1090
                    Version number 1.1.0.2 (was 1.1.0.1)
thoughtpolice's avatar
thoughtpolice committed
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>process</title>
        <itemizedlist>
            <listitem>
                <para>
1101
                    Version number 1.2.0.0 (was 1.1.0.2)
thoughtpolice's avatar
thoughtpolice committed
1102
1103
               </para>
           </listitem>
Austin Seipp's avatar
Austin Seipp committed
1104
1105
1106
1107
1108
1109
1110
            <listitem>
                <para>
                    Several bugs have been fixed, including deadlocks
                    in <literal>readProcess</literal> and
                    <literal>readProcessWithExitCode</literal>.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
1111
1112
1113
1114
1115
1116
1117
1118
       </itemizedlist>
    </sect3>

    <sect3>
        <title>template-haskell</title>
        <itemizedlist>
            <listitem>
                <para>
1119
                    Version number 2.9.0.0 (was 2.8.0.0)
thoughtpolice's avatar
thoughtpolice committed
1120
               </para>
Austin Seipp's avatar
Austin Seipp committed
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
           </listitem>
            <listitem>
                <para>
                    Typed Template Haskell expressions are now
                    supported. See <xref linkend="template-haskell"/>
                    for more details.
               </para>
           </listitem>
            <listitem>
                <para>
                    There is now support for roles.
               </para>
thoughtpolice's avatar
thoughtpolice committed
1133
           </listitem>
Austin Seipp's avatar
Austin Seipp committed
1134
1135
1136
1137
1138
            <listitem>
                <para>
                    There is now support for annotation pragmas.
               </para>
           </listitem>
thoughtpolice's avatar
thoughtpolice committed
1139
1140
1141
1142
1143
1144
1145
1146
       </itemizedlist>
    </sect3>

    <sect3>
        <title>time</title>
        <itemizedlist>
            <listitem>
                <para>
1147
                    Version number 1.4.1 (was 1.4.1)
thoughtpolice's avatar
thoughtpolice committed
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>unix</title>
        <itemizedlist>
            <listitem>
                <para>
thoughtpolice's avatar
thoughtpolice committed
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
                    Version number 2.7.0.0 (was 2.6.0.0)
               </para>
           </listitem>
            <listitem>
                <para>
                    A crash in <literal>getGroupEntryForID</literal>
                    (and related functions like
                    <literal>getUserEntryForID</literal> and
                    <literal>getUserEntryForName</literal>) in
                    multi-threaded applications has been fixed.
               </para>
           </listitem>
            <listitem>
                <para>
thoughtpolice's avatar
thoughtpolice committed
1172
                    The functions <literal>getGroupEntryForID</literal>
thoughtpolice's avatar
thoughtpolice committed
1173
                    and <literal>getUserEntryForID</literal> now fail
thoughtpolice's avatar
thoughtpolice committed
1174
                    with a <literal>isDoesNotExist</literal> error when
thoughtpolice's avatar
thoughtpolice committed
1175
                    the specified ID cannot be found.
thoughtpolice's avatar
thoughtpolice committed
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
               </para>
           </listitem>
       </itemizedlist>
    </sect3>

    <sect3>
        <title>Win32</title>
        <itemizedlist>
            <listitem>
                <para>
1186
                    Version number 2.3.0.1 (was 2.3.0.0)
thoughtpolice's avatar
thoughtpolice committed
1187
1188
1189
1190
               </para>
           </listitem>
       </itemizedlist>
    </sect3>
1191
  </sect2>
1192
1193
1194
1195

  <sect2>
    <title>Known bugs</title>
    <itemizedlist>
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
        <listitem>
            <para>
                On OS X Mavericks, when using Clang as the C
                preprocessor, Haddock has a bug that causes it to fail
                to generate documentation, with an error similar to
                the following:

<programlisting>
&lt;no location info&gt;:
    module 'xhtml-3000.2.1:Main' is defined in multiple files: dist-bindist/build/tmp-72252/Text/XHtml.hs
                                                               dist-bindist/build/tmp-72252/Text/XHtml/Frameset.hs
                                                               dist-bindist/build/tmp-72252/Text/XHtml/Strict.hs
                                                               dist-bindist/build/tmp-72252/Text/XHtml/Transitional.hs
...
</programlisting>

           </para>
            <para>
                This only affects certain packages. This is due to a
                bad interaction with Clang, which we hope to resolve
                soon.
           </para>
            <para>
                Note that when using <literal>cabal-install</literal>,
                this only effects the package documentation, not
                installation or building.
           </para>
       </listitem>
1224
1225
1226
1227
        <listitem>
            <para>
                On OS X 10.7 and beyond, with default build settings,
                the runtime system currently suffers from a fairly
1228
1229
1230
                large (approx. 30%) performance regression in the
                parallel garbage collector when using
                <literal>-threaded</literal>.
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
           </para>
            <para>
                This is due to the fact that the OS X 10.7+ toolchain
                does not (by default) support register variables, or a
                fast <literal>__thread</literal> implementation. Note
                that this can be worked around by building GHC using
                GCC instead on OS X platforms, but the binary
                distribution then requires GCC later.
           </para>
       </listitem>

        <listitem>
            <para>
                On Windows, <literal>-dynamic-too</literal> is unsupported.
           </para>
       </listitem>

        <listitem>
            <para>
                On Windows, we currently don't ship dynamic libraries
Austin Seipp's avatar
Austin Seipp committed
1251
                or use a dynamic GHCi, unlike Linux, FreeBSD or OS X.
1252
1253
1254
1255
           </para>
       </listitem>
   </itemizedlist>
  </sect2>
1256
</sect1>