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
|
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="release-6-14-1">
<title>Release notes for version 6.14.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 6.12 branch.
</para>
<sect2>
<title>Highlights</title>
<itemizedlist>
<listitem>
<para>
GHC now defaults to the Haskell 2010 language standard.
</para>
<para>
Libraries are not quite so straightforward. By default, GHC
provides access to the <literal>base</literal> package,
which includes the Haskell 2010 libraries, albeit with a few
minor differences. For those who want to write strictly
standards-conforming code we also provide
the <literal>haskell2010</literal> package which provides
the precise APIs specified by Haskell 2010, but because the
module names in this package overlap with those in
the <literal>base</literal> package it is not possible to
use both <literal>haskell2010</literal>
and <literal>base</literal> at the same time (this also
applies to the <literal>array</literal> package). Hence to use
the Haskell 2010 libraries you should hide
the <literal>base</literal> and <literal>array</literal>
packages, for example with GHCi:
<screen>
$ ghci -package haskell2010 -hide-package base -hide-package array
</screen>
If you are using Cabal it isn't necessary to
hide <literal>base</literal> and <literal>array</literal>
explicitly, just don't include them in your <literal>build-depends</literal>.
</para>
</listitem>
<listitem>
<para>
On POSIX platforms, there is a new I/O manager based on
epoll/kqueue/poll, which allows multithreaded I/O code to
scale to a much larger number (100k+) of threads.
</para>
</listitem>
<listitem>
<para>
The inliner has been overhauled, which should in general
give better performance while reducing unnecessary code-size
explosion.
</para>
</listitem>
<listitem>
<para>
Large parts of the runtime system have been overhauled, in
particular the machinery related to blocking and wakeup of
threads and exception throwing (<literal>throwTo</literal>).
Several instances of pathological performance have been
fixed, especially where large numbers of threads are
involved.
</para>
</listitem>
<listitem>
<para>
Due to changes in the runtime system, if you are
using <literal>Control.Parallel.Strategies</literal> from
the <literal>parallel</literal> package, please upgrade to
at least version 2 (preferably version 3). The
implementation of Strategies
in <literal>parallel-1.x</literal> will lose parallelism
with GHC 6.14.1.
</para>
</listitem>
<listitem>
<para>
The full Haskell <literal>import</literal> syntax can now been
used to bring modules into scope in GHCi, e.g.
</para>
<programlisting>
Prelude> import Data.List as L
Prelude Data.List> L.length "foo"
3
</programlisting>
</listitem>
<listitem>
<para>
GHC now comes with a more recent mingw bundled on Windows,
which includes a fix for windres on Windows 7.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Language changes</title>
<itemizedlist>
<listitem>
<para>
GHC now understands the <literal>Haskell98</literal> and
<literal>Haskell2010</literal> languages.
</para>
<para>
These get processed before the language extension pragmas,
and define the default sets of extensions that are enabled.
If neither is specified, then the default is
<literal>Haskell2010</literal> plus the
<literal>MonoPatBinds</literal> extension.
</para>
</listitem>
<listitem>
<para>
GHC now supports the <literal>DoAndIfThenElse</literal>
extension, which is part of the Haskell 2010 standard.
</para>
</listitem>
<listitem>
<para>
Datatype contexts, such as the <literal>Eq a</literal> in
</para>
<programlisting>
data Eq a => Set a = NilSet | ConsSet a (Set a)
</programlisting>
<para>
are now treated as an extension
<literal>DatatypeContexts</literal> (on by default) by GHC.
</para>
</listitem>
<listitem>
<para>
GHC's support for unicode source has been improved, including
removing support for U+22EF for the <literal>..</literal>
symbol. See <xref linkend="unicode-syntax" /> for more details.
</para>
</listitem>
<listitem>
<para>
Pragmas are now reread after preprocessing. In particular,
this means that if a pragma is used to turn CPP on, then other
pragmas can be put in CPP conditionals.
</para>
</listitem>
<listitem>
<para>
The <literal>TypeOperators</literal> extension now allows
instance heads to use infix syntax.
</para>
</listitem>
<listitem>
<para>
The <literal>PackageImports</literal> extension now understands
<literal>this</literal> to mean the current package.
</para>
</listitem>
<listitem>
<para>
The <literal>INLINE</literal> and <literal>NOINLINE</literal>
pragmas can now take a <literal>CONLIKE</literal> modifier,
which indicates that the right hand side is cheap to compute,
and can thus be duplicated more freely.
See <xref linkend="conlike" /> for more details.
</para>
</listitem>
<listitem>
<para>
A <literal>ForceSpecConstr</literal> annotation on a type, e.g.
</para>
<programlisting>
import SpecConstr
{-# ANN type SPEC ForceSpecConstr #-}
</programlisting>
<para>
can be used to force GHC to fully specialise argument of that
type.
</para>
</listitem>
<listitem>
<para>
A <literal>NoSpecConstr</literal> annotation on a type, e.g.
</para>
<programlisting>
import SpecConstr
{-# ANN type T NoSpecConstr #-}
</programlisting>
<para>
can be used to prevent SpecConstr from specialising on
arguments of that type.
</para>
</listitem>
<listitem>
<para>
There is are two experimental new extensions
<literal>AlternativeLayoutRule</literal> and
<literal>AlternativeLayoutRuleTransitional</literal>,
which are for exploring alternative layout rules in Haskell'.
The details are subject to change, so we advise against using
them in real code for now.
</para>
</listitem>
<listitem>
<para>
The <literal>NewQualifiedOperators</literal> extension has
been deprecated, as it was rejected by the Haskell' committee.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Warnings</title>
<itemizedlist>
<listitem>
<para>
There is now a warning for missing import lists, controlled
by the new <literal>-fwarn-missing-import-lists</literal> flag.
</para>
</listitem>
<listitem>
<para>
GHC will now warn about <literal>SPECIALISE</literal> and
<literal>UNPACK</literal> pragmas that have no effect.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>DLLs</title>
<itemizedlist>
<listitem>
<para>
Shared libraries are once again supported on Windows.
</para>
</listitem>
<listitem>
<para>
Shared libraries are now supported on OS X, both on x86 and on
PowerPC. The new <literal>-dylib-install-name</literal> GHC
flag is used to set the location of the dynamic library.
See <xref linkend="finding-shared-libs" /> for more details.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Runtime system</title>
<itemizedlist>
<listitem>
<para>
For security reasons, by default, the only RTS flag that
programs accept is <literal>+RTS --info</literal>. If you want
the full range of RTS flags then you need to link with the new
<literal>-rtsopts</literal> flag. See
<xref linkend="options-linker" /> for more details.
</para>
</listitem>
<listitem>
<para>
The RTS now exports a function <literal>setKeepCAFs</literal>
which is important when loading Haskell DLLs dynamically, as
a DLL may refer to CAFs that hae already been GCed.
</para>
</listitem>
<listitem>
<para>
The garbage collector no longer allows you to specify a number
of steps; there are now always 2. The <literal>-T</literal>
RTS flag has thus been removed.
</para>
</listitem>
<listitem>
<para>
A new RTS flag <literal>-H</literal> causes the RTS to use a
larger nursery, but without exceeding the amount of memory
that the application is already using. It makes some programs
go slower, but others go faster.
</para>
</listitem>
<listitem>
<para>
GHC now returns memory to the OS, if memory usage peaks and
then drops again. This is mainly useful for long running
processes which normally use very little memory, but
occasionally need a lot of memory for a short period of time.
</para>
</listitem>
<listitem>
<para>
On OS X, eventLog events are now available as DTrace probes.
</para>
</listitem>
<listitem>
<para>
The PAPI support has been improved. The new RTS flag
<literal>-a#0x40000000</literal> can be used to tell the RTS
to collect the native PAPI event <literal>0x40000000</literal>.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Compiler</title>
<itemizedlist>
<listitem>
<para>
GHC now defaults to <literal>--make</literal> mode, i.e. GHC
will chase dependencies for you automatically by default.
</para>
</listitem>
<listitem>
<para>
GHC now includes an LLVM code generator.
</para>
<para>
This includes a number of new flags:
a flag to tell GHC to use LLVM, <literal>-fllvm</literal>;
a flag to dump the LLVM input ,<literal>-ddump-llvm</literal>;
flags to keep the LLVM intermediate files,
<literal>-keep-llvm-file</literal> and
<literal>-keep-llvm-files</literal>;
flags to set the location and options for the LLVM assembler,
optimiser and compiler,
<literal>-pgmla</literal>,
<literal>-pgmlo</literal>,
<literal>-pgmlc</literal>,
<literal>-optla</literal>,
<literal>-optlo</literal> and
<literal>-optlc</literal>.
</para>
</listitem>
<listitem>
<para>
It is now possible to use <literal>-fno-code</literal> with
<literal>--make</literal>.
</para>
</listitem>
<listitem>
<para>
The new flag <literal>-dsuppress-coercions</literal> controls
whether GHC prints coercions in core dumps.
</para>
</listitem>
<listitem>
<para>
The new flag <literal>-dsuppress-module-prefixes</literal>
controls whether GHC prints module qualification prefixes
in core dumps.
</para>
</listitem>
<listitem>
<para>
The inliner has been overhauled. The most significant
user-visible change is that only saturated functions are
inlined, e.g.
</para>
<programlisting>
(.) f g x = f (g x)
</programlisting>
<para>
would only be inlined if <literal>(.)</literal> is applied to 3
arguments, while
</para>
<programlisting>
(.) f g = \x -> f (g x)
</programlisting>
<para>
will be inlined if only applied to 2 arguments.
</para>
</listitem>
<listitem>
<para>
The <literal>-finline-if-enough-args</literal> flag is no
longer supported.
</para>
</listitem>
<listitem>
<para>
Column numbers in warnings and error messages now start at 1,
as is more standard, rather than 0.
</para>
</listitem>
<listitem>
<para>
GHCi now understands most linker scripts. In particular, this
means that GHCi is able to load the C pthread library.
</para>
</listitem>
<listitem>
<para>
The <literal>ghc --info</literal> output has been updated:
</para>
<para>
It now includes the
location of the global package database, in the
<literal>Global Package DB</literal> field.
</para>
<para>
It now includes the build, host and target platforms, in the
<literal>Build platform</literal>,
<literal>Host platform</literal> and
<literal>Target platform</literal> fields.
</para>
<para>
It now includes a <literal>Have llvm code generator</literal>
field.
</para>
<para>
The <literal>Win32 DLLs</literal> field has been removed.
</para>
</listitem>
<listitem>
<para>
The registerised via-C backend, and the
<literal>-fvia-C</literal> flag, have been deprecated. The poor
floating-point performance in the x86 native code generator
has now been fixed, so we don't believe there is still any
reason to use the via-C backend.
</para>
</listitem>
<listitem>
<para>
There is now a new flag <literal>--supported-extensions</literal>,
which currently behaves the same as
<literal>--supported-languages</literal>.
</para>
</listitem>
<listitem>
<para>
GHC progress output such as
</para>
<programlisting>
[ 1 of 5] Compiling Foo ( Foo.hs, Foo.o )
</programlisting>
<para>
is now sent to stdout rather than stderr.
</para>
</listitem>
<listitem>
<para>
The new flag <literal>-fexpose-all-unfoldings</literal>
makes GHC put unfoldings for <emphasis>everything</emphasis>
in the interface file.
</para>
</listitem>
<listitem>
<para>
There are two new flags, <literal>-fno-specialise</literal>
and <literal>-fno-float-in</literal>, for disabling the
specialise and float-in passes.
</para>
</listitem>
<listitem>
<para>
The new flag <literal>-fstrictness-before=<replaceable>n</replaceable></literal> tells
GHC to run an additional strictness analysis pass
before simplifier phase <replaceable>n</replaceable>.
</para>
</listitem>
<listitem>
<para>
There is a new flag
<literal>-funfolding-dict-discount</literal>
for tweaking the optimiser's behaviour.
</para>
</listitem>
<listitem>
<para>
The <literal>-fspec-inline-join-points</literal> flag has been
removed.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>GHCi</title>
<itemizedlist>
<listitem>
<para>
GHCi now understands layout in multi-line commands, so
this now works:
</para>
<programlisting>
Prelude> :{
Prelude| let x = 1
Prelude| y = 2 in x + y
Prelude| :}
3
</programlisting>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Template Haskell and Quasi-Quoters</title>
<itemizedlist>
<listitem>
<para>
It is now possible to quasi-quote patterns with
<literal>[p| ... |]</literal>.
</para>
</listitem>
<listitem>
<para>
It is no longer to use a <literal>$</literal> before the
name of a quasi-quoter, e.g. one can now say
<literal>[expr| ... |]</literal> rather than
<literal>[$expr| ... |]</literal>.
</para>
</listitem>
<listitem>
<para>
It is now possible to use a quasi-quoter for types, e.g.
<literal>f :: [$qq| ... |]</literal>
</para>
</listitem>
<listitem>
<para>
It is now possible to quasi-quote existentials and GADTs.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>GHC API</title>
<itemizedlist>
<listitem>
<para>
There are now <literal>Data</literal> and
<literal>Typeable</literal> instances for the
HsSyn typed.
</para>
</listitem>
<listitem>
<para>
As language extensions are not applied until after the base
language (Haskell98, Haskell2010 or the default) has been
selected, it is now necessary to tell the GHC API the point
at which the extension flags should be processed. Normally
this is done by calling
<literal>DynFlags.flattenExtensionFlags</literal> once all
the flags and pragmas have been read.
</para>
</listitem>
</itemizedlist>
</sect2>
<!--
<sect2>
<title>Libraries</title>
<itemizedlist>
</itemizedlist>
</sect2>
-->
</sect1>
|