1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
|
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="release-7-8-1">
<title>Release notes for version 7.8.1</title>
<para>
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.
</para>
<sect2>
<title>Highlights</title>
<para>
The highlights, since the 7.6 branch, are:
</para>
<itemizedlist>
<listitem>
<para>
GHC now supports "type holes" with the
<literal>TypeHoles</literal> extension. When enabled, the
unbound literal <literal>_</literal> may be used during
development in place of a regular identifier, and GHC will
respond with the type necessary to "fill in the hole."
TODO FIXME: reference.
</para>
</listitem>
<listitem>
<para>
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.
TODO FIXME: reference.
</para>
</listitem>
<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.
TODO FIXME: reference.
</para>
</listitem>
<listitem>
<para>
GHC now supports overloading list literals using the new
<literal>OverloadedLists</literal> extension.
TODO FIXME: reference.
</para>
</listitem>
<listitem>
<para>
There has been significant overhaul of the type inference engine and
constraint solver.
TODO FIXME: reference.
</para>
</listitem>
<listitem>
<para>
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
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>
The LLVM backend now supports 128bit SIMD
operations. This is now exploited in both the
<literal>vector</literal> and <literal>dph</literal>
packages, exposing a high level interface.
TODO FIXME: reference.
</para>
<para>
This is only available with the LLVM backend.
</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>
<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.
TODO FIXME: reference.
</para>
</listitem>
<listitem>
<para>
PrimOps for comparing unboxed values now return
<literal>Int#</literal> instead of <literal>Bool</literal>.
New PrimOps' names end with <literal>$#</literal> for operators and
<literal>I#</literal> for ordinary names, e.g. <literal>==$#</literal>
compares <literal>Int#</literal>s for equality and
<literal>eqCharI#</literal> does the same for <literal>Char#</literal>s.
Old PrimOps have been removed and turned into wrappers. See
<ulink url="http://ghc.haskell.org/trac/ghc/wiki/NewPrimopsInGHC7.8">
this GHC wiki page</ulink> for instructions how to update your
existing code.
</para>
</listitem>
<listitem>
<para>
New PrimOps for atomic memory operations.
The <literal>casMutVar#</literal> PrimOp was introduced in
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
(<literal>fetchAddIntArray#</literal>).
</para>
</listitem>
<listitem>
<para>
TODO: mention dynamic changes
</para>
</listitem>
<listitem>
<para>
<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.
</para>
</listitem>
<listitem>
<para>
GHC now has a parallel compilation driver. When
compiling with <literal>--make</literal> (which is on
by default,) you may also specify
<literal>-jN</literal> in order to compile
<replaceable>N</replaceable> modules in parallel.
</para>
</listitem>
<listitem>
<para>
GHC now generates warnings when definitions conflict with the
Applicative-Monad Proposal (AMP).
TODO FIXME: reference.
</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><*></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>
</itemizedlist>
</sect2>
<sect2>
<title>Full details</title>
<sect3>
<title>Language</title>
<itemizedlist>
<listitem>
<para>
There is a new extension,
<literal>NullaryTypeClasses</literal>, which
allows you to declare a type class without any
parameters.
</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>
</para>
</listitem>
</itemizedlist>
<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>
<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>
</sect3>
<sect3>
<title>Compiler</title>
<itemizedlist>
<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
<literal>-dynosuf</literal>.
</para>
<para>
Note that GHC still builds statically by default.
</para>
</listitem>
<listitem>
<para>
GHC now supports a <literal>--show-options</literal> flag,
which will dump all of the flags it supports to standard out.
</para>
</listitem>
<listitem>
<para>
GHC now supports warning about overflow of integer
literals, enabled by
<literal>-fwarn-overflowed-literals</literal>. It
is enabled by default
</para>
</listitem>
<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>
<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>
<listitem>
<para>
The LLVM backend was overhauled and rewritten, and
should hopefully be easier to maintain and work on
in the future.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>GHCi</title>
<itemizedlist>
<listitem>
<para>
GHCi now supports a <literal>prompt2</literal>
setting, which allows you to customize the
continuation prompt of multi-line input.
TODO FIXME: reference.
</para>
</listitem>
<listitem>
<para>
The new <literal>:shows paths</literal> command
shows the current working directory and the
current search path for Haskell modules.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Template Haskell</title>
<itemizedlist>
<listitem>
<para>
TODO FIXME
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Runtime system</title>
<itemizedlist>
<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>
<listitem>
<para>
The performance of <literal>StablePtr</literal>s and
<literal>StableName</literal>s has been improved.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Build system</title>
<itemizedlist>
<listitem>
<para>
GHC >= 7.4 is now required for bootstrapping.
</para>
</listitem>
<listitem>
<para>
GHC can now be built with Clang, and use Clang as the
preprocessor for Haskell code. Only Clang version 3.4svn is
reliably supported.
</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>
<sect2>
<title>Libraries</title>
<para>
There have been some changes that have effected multiple
libraries:
</para>
<itemizedlist>
<listitem>
<para>
TODO FIXME
</para>
</listitem>
</itemizedlist>
<para>
The following libraries have been removed from the GHC tree:
</para>
<itemizedlist>
<listitem>
<para>TODO FIXME</para>
</listitem>
</itemizedlist>
<para>
The following libraries have been added to the GHC tree:
</para>
<itemizedlist>
<listitem>
<para>TODO FIXME</para>
</listitem>
</itemizedlist>
<sect3>
<title>array</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</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
need be of kind <literal>* -> * -> *</literal>
</para>
</listitem>
<listitem>
<para>
There are now <literal>Foldable</literal> and <literal>Traversable</literal>
instances for <literal>Either a</literal> and <literal>(,) a</literal>
</para>
</listitem>
<listitem>
<para>
There is now a <literal>Data</literal> instance for <literal>Data.Version</literal>
</para>
</listitem>
<listitem>
<para>
<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.
</para>
</listitem>
<listitem>
<para>
There are now byte endian-swapping primitives
available in <literal>Data.Word</literal>, which
use optimized machine instructions when available.
</para>
</listitem>
</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>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>bytestring</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Cabal</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>containers</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>deepseq</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>directory</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>filepath</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>ghc-prim</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>haskell98</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>haskell2010</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>hoopl</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>hpc</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>integer-gmp</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>old-locale</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>old-time</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>process</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>template-haskell</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>time</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>unix</title>
<itemizedlist>
<listitem>
<para>
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>
The functions <literal>getGroupEntryForID</literal>
and <literal>getUserEntryForID</literal> now fail
with a <literal>isDoesNotExist</literal> error when
the specified ID cannot be found.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Win32</title>
<itemizedlist>
<listitem>
<para>
Version number XXXX (was XXXX)
</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>
</sect1>
|