5c9c1c99934dd73b4a50e704b1076a5e6f751d95
[ghc.git] / docs / users_guide / 7.8.1-notes.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-7-8-1">
3 <title>Release notes for version 7.8.1</title>
4
5 <para>
6 The significant changes to the various parts of the compiler are listed
7 in the following sections. There have also been numerous bug fixes and
8 performance improvements over the 7.6 branch.
9 </para>
10
11 <sect2>
12 <title>Highlights</title>
13
14 <para>
15 The highlights, since the 7.6 branch, are:
16 </para>
17
18 <itemizedlist>
19 <listitem>
20 <para>
21 GHC now supports "type holes" with the
22 <literal>TypeHoles</literal> extension. When enabled, the
23 unbound literal <literal>_</literal> may be used during
24 development in place of a regular identifier, and GHC will
25 respond with the type necessary to "fill in the hole."
26
27 TODO FIXME: reference.
28 </para>
29 </listitem>
30
31 <listitem>
32 <para>
33 It is now possible to declare a 'closed' <literal>type
34 family</literal> when using the
35 <literal>TypeFamilies</literal> extension. A closed
36 <literal>type family</literal> cannot have any
37 instances created other than the ones in its
38 definition.
39
40 TODO FIXME: reference.
41 </para>
42 </listitem>
43
44 <listitem>
45 <para>
46 Use of the <literal>GeneralizedNewtypeDeriving</literal>
47 extension is now subject to <emphasis>role checking</emphasis>,
48 to ensure type safety of the derived instances. As this change
49 increases the type safety of GHC, it is possible that some code
50 that previously compiled will no longer work.
51
52 TODO FIXME: reference.
53 </para>
54 </listitem>
55
56 <listitem>
57 <para>
58 GHC now supports overloading list literals using the new
59 <literal>OverloadedLists</literal> extension.
60
61 TODO FIXME: reference.
62 </para>
63 </listitem>
64
65 <listitem>
66 <para>
67 There has been significant overhaul of the type inference engine and
68 constraint solver.
69
70 TODO FIXME: reference.
71 </para>
72 </listitem>
73
74 <listitem>
75 <para>
76 By default, GHC will now unbox all "small" strict
77 fields in a data type. A "small" data type is one
78 whose size is equivalent to or smaller than the native
79 word size of the machine. This means you no longer
80 have to specify <literal>UNPACK</literal> pragmas for
81 e.g. strict <literal>Int</literal> fields. This also
82 applies to floating-point values.
83 </para>
84 </listitem>
85
86 <listitem>
87 <para>
88 GHC now has a brand-new I/O manager that scales significantly
89 better for larger workloads compared to the previous one. It
90 should scale linearly up to approximately 32 cores.
91 </para>
92 </listitem>
93
94 <listitem>
95 <para>
96 The LLVM backend now supports 128bit SIMD
97 operations. This is now exploited in both the
98 <literal>vector</literal> and <literal>dph</literal>
99 packages, exposing a high level interface.
100
101 TODO FIXME: reference.
102 </para>
103 <para>
104 This is only available with the LLVM backend.
105 </para>
106 </listitem>
107
108 <listitem>
109 <para>
110 The new code generator, after significant work by many
111 individuals over the past several years, is now enabled by
112 default. This is a complete rewrite of the STG to Cmm
113 transformation. In general, your programs may get slightly
114 faster.
115 </para>
116
117 <para>
118 The old code generator has been removed completely.
119 </para>
120 </listitem>
121
122 <listitem>
123 <para>
124 GHC now has substantially better support for cross
125 compilation. In particular, GHC now has all the
126 necessary patches to support cross compilation to
127 Apple iOS, using the LLVM backend.
128
129 TODO FIXME: reference.
130 </para>
131 </listitem>
132
133 <listitem>
134 <para>
135 PrimOps for comparing unboxed values now return
136 <literal>Int#</literal> instead of <literal>Bool</literal>.
137 New PrimOps' names end with <literal>$#</literal> for operators and
138 <literal>I#</literal> for ordinary names, e.g. <literal>==$#</literal>
139 compares <literal>Int#</literal>s for equality and
140 <literal>eqCharI#</literal> does the same for <literal>Char#</literal>s.
141 Old PrimOps have been removed and turned into wrappers. See
142 <ulink url="http://ghc.haskell.org/trac/ghc/wiki/NewPrimopsInGHC7.8">
143 this GHC wiki page</ulink> for instructions how to update your
144 existing code.
145 </para>
146 </listitem>
147
148 <listitem>
149 <para>
150 TODO: mention dynamic changes
151 </para>
152 </listitem>
153
154 <listitem>
155 <para>
156 TODO: mention new <literal>Typeable</literal> and
157 <literal>AutoDeriveTypeable</literal>
158 </para>
159 </listitem>
160 </itemizedlist>
161 </sect2>
162
163 <sect2>
164 <title>Full details</title>
165 <sect3>
166 <title>Language</title>
167 <itemizedlist>
168 <listitem>
169 <para>
170 There is a new extension,
171 <literal>NullaryTypeClasses</literal>, which
172 allows you to declare a type class without any
173 parameters.
174 </para>
175 </listitem>
176 </itemizedlist>
177
178 <itemizedlist>
179 <listitem>
180 <para>
181 There is a new extension,
182 <literal>NumDecimals</literal>, which allows you
183 to specify an integer using compact "floating
184 literal" syntax. This lets you say things like
185 <literal>1.2e6 :: Integer</literal> instead of
186 <literal>1200000</literal>
187 </para>
188 </listitem>
189 </itemizedlist>
190
191 <itemizedlist>
192 <listitem>
193 <para>
194 There is a new extension,
195 <literal>NegativeLiterals</literal>, which will
196 cause GHC to interpret the expression
197 <literal>-123</literal> as <literal>fromIntegral
198 (-123)</literal>. Haskell 98 and Haskell 2010 both
199 specify that it should instead desugar to
200 <literal>negate (fromIntegral 123)</literal>
201 </para>
202 </listitem>
203 </itemizedlist>
204 </sect3>
205
206 <sect3>
207 <title>Compiler</title>
208 <itemizedlist>
209 <listitem>
210 <para>
211 GHC can now build both static and dynamic object
212 files at the same time in a single compilation
213 pass, when given the
214 <literal>-dynamic-too</literal> flag. This will
215 produce both a statically-linkable
216 <literal>.o</literal> object file, and a
217 dynamically-linkable <literal>.dyn_o</literal>
218 file. The output suffix of the dynamic objects can
219 be controlled by the flag
220 <literal>-dyno</literal>.
221 </para>
222
223 <para>
224 Note that GHC still builds statically by default.
225 </para>
226 </listitem>
227 <listitem>
228 <para>
229 GHC now supports a <literal>--show-options</literal> flag,
230 which will dump all of the flags it supports to standard out.
231 </para>
232 </listitem>
233 <listitem>
234 <para>
235 GHC now supports warning about overflow of integer
236 literals, enabled by
237 <literal>-fwarn-overflowed-literals</literal>. It
238 is enabled by default
239 </para>
240 </listitem>
241 <listitem>
242 <para>
243 It's now possible to switch the system linker on Linux
244 (between GNU gold and GNU ld) at runtime without problem.
245 </para>
246 </listitem>
247 <listitem>
248 <para>
249 The <literal>-fwarn-dodgy-imports</literal> flag now warns
250 in the case an <literal>import</literal> statement hides an
251 entity which is not exported.
252 </para>
253 </listitem>
254 <listitem>
255 <para>
256 The LLVM backend was overhauled and rewritten, and
257 should hopefully be easier to maintain and work on
258 in the future.
259 </para>
260 </listitem>
261 </itemizedlist>
262 </sect3>
263
264 <sect3>
265 <title>GHCi</title>
266 <itemizedlist>
267 <listitem>
268 <para>
269 GHCi now supports a <literal>prompt2</literal>
270 setting, which allows you to customize the
271 continuation prompt of multi-line input.
272
273 TODO FIXME: reference.
274 </para>
275 </listitem>
276 <listitem>
277 <para>
278 The new <literal>:shows paths</literal> command
279 shows the current working directory and the
280 current search path for Haskell modules.
281 </para>
282 </listitem>
283 </itemizedlist>
284 </sect3>
285
286 <sect3>
287 <title>Template Haskell</title>
288 <itemizedlist>
289 <listitem>
290 <para>
291 TODO FIXME
292 </para>
293 </listitem>
294 </itemizedlist>
295 </sect3>
296
297 <sect3>
298 <title>Runtime system</title>
299 <itemizedlist>
300 <listitem>
301 <para>
302 The performance of <literal>StablePtr</literal>s and
303 <literal>StableName</literal>s has been improved.
304 </para>
305 </listitem>
306 </itemizedlist>
307 </sect3>
308
309 <sect3>
310 <title>Build system</title>
311 <itemizedlist>
312 <listitem>
313 <para>
314 GHC >= 7.4 is now required for bootstrapping.
315 </para>
316 </listitem>
317 <listitem>
318 <para>
319 GHC can now be built with Clang, and use Clang as the
320 preprocessor for Haskell code. Only Clang version 3.4svn is
321 reliably supported.
322 </para>
323 </listitem>
324 </itemizedlist>
325 </sect3>
326 </sect2>
327
328 <sect2>
329 <title>Libraries</title>
330
331 <para>
332 There have been some changes that have effected multiple
333 libraries:
334 </para>
335
336 <itemizedlist>
337 <listitem>
338 <para>
339 TODO FIXME
340 </para>
341 </listitem>
342 </itemizedlist>
343
344 <para>
345 The following libraries have been removed from the GHC tree:
346 </para>
347
348 <itemizedlist>
349 <listitem>
350 <para>TODO FIXME</para>
351 </listitem>
352 </itemizedlist>
353
354 <para>
355 The following libraries have been added to the GHC tree:
356 </para>
357
358 <itemizedlist>
359 <listitem>
360 <para>TODO FIXME</para>
361 </listitem>
362 </itemizedlist>
363
364 <sect3>
365 <title>array</title>
366 <itemizedlist>
367 <listitem>
368 <para>
369 Version number XXXX (was XXXX)
370 </para>
371 </listitem>
372 </itemizedlist>
373 </sect3>
374
375 <sect3>
376 <title>base</title>
377 <itemizedlist>
378 <listitem>
379 <para>
380 Version number 4.7.0.0 (was 4.6.0.1)
381 </para>
382 </listitem>
383 <listitem>
384 <para>
385 The <literal>Control.Category</literal> module now has the
386 <literal>PolyKinds</literal> extension enabled, meaning
387 that instances of <literal>Category</literal> no longer
388 need be of kind <literal>* -> * -> *</literal>
389 </para>
390 </listitem>
391 <listitem>
392 <para>
393 There are now <literal>Foldable</literal> and <literal>Traversable</literal>
394 instances for <literal>Either a</literal> and <literal>(,) a</literal>
395 </para>
396 </listitem>
397 <listitem>
398 <para>
399 <literal>Control.Concurrent.MVar</literal> has a new
400 implementation of <literal>readMVar</literal>, which
401 fixes a long-standing bug where
402 <literal>readMVar</literal> is only atomic if there
403 are no other threads running
404 <literal>putMVar</literal>.
405 <literal>readMVar</literal> now is atomic, and is
406 guaranteed to return the value from the first
407 <literal>putMVar</literal>. There is also a new <literal>tryReadMVar</literal>
408 which is a non-blocking version.
409 </para>
410 </listitem>
411 <listitem>
412 <para>
413 There are now byte endian-swapping primitives
414 available in <literal>Data.Word</literal>, which
415 use optimized machine instructions when available.
416 </para>
417 </listitem>
418 </itemizedlist>
419 </sect3>
420
421 <sect3>
422 <title>bin-package-db</title>
423 <itemizedlist>
424 <listitem>
425 <para>
426 This is an internal package, and should not be used.
427 </para>
428 </listitem>
429 </itemizedlist>
430 </sect3>
431
432 <sect3>
433 <title>binary</title>
434 <itemizedlist>
435 <listitem>
436 <para>
437 Version number XXXX (was XXXX)
438 </para>
439 </listitem>
440 </itemizedlist>
441 </sect3>
442
443 <sect3>
444 <title>bytestring</title>
445 <itemizedlist>
446 <listitem>
447 <para>
448 Version number XXXX (was XXXX)
449 </para>
450 </listitem>
451 </itemizedlist>
452 </sect3>
453
454 <sect3>
455 <title>Cabal</title>
456 <itemizedlist>
457 <listitem>
458 <para>
459 Version number XXXX (was XXXX)
460 </para>
461 </listitem>
462 </itemizedlist>
463 </sect3>
464
465 <sect3>
466 <title>containers</title>
467 <itemizedlist>
468 <listitem>
469 <para>
470 Version number XXXX (was XXXX)
471 </para>
472 </listitem>
473 </itemizedlist>
474 </sect3>
475
476 <sect3>
477 <title>deepseq</title>
478 <itemizedlist>
479 <listitem>
480 <para>
481 Version number XXXX (was XXXX)
482 </para>
483 </listitem>
484 </itemizedlist>
485 </sect3>
486
487 <sect3>
488 <title>directory</title>
489 <itemizedlist>
490 <listitem>
491 <para>
492 Version number XXXX (was XXXX)
493 </para>
494 </listitem>
495 </itemizedlist>
496 </sect3>
497
498 <sect3>
499 <title>filepath</title>
500 <itemizedlist>
501 <listitem>
502 <para>
503 Version number XXXX (was XXXX)
504 </para>
505 </listitem>
506 </itemizedlist>
507 </sect3>
508
509 <sect3>
510 <title>ghc-prim</title>
511 <itemizedlist>
512 <listitem>
513 <para>
514 Version number XXXX (was XXXX)
515 </para>
516 </listitem>
517 </itemizedlist>
518 </sect3>
519
520 <sect3>
521 <title>haskell98</title>
522 <itemizedlist>
523 <listitem>
524 <para>
525 Version number XXXX (was XXXX)
526 </para>
527 </listitem>
528 </itemizedlist>
529 </sect3>
530
531 <sect3>
532 <title>haskell2010</title>
533 <itemizedlist>
534 <listitem>
535 <para>
536 Version number XXXX (was XXXX)
537 </para>
538 </listitem>
539 </itemizedlist>
540 </sect3>
541
542 <sect3>
543 <title>hoopl</title>
544 <itemizedlist>
545 <listitem>
546 <para>
547 Version number XXXX (was XXXX)
548 </para>
549 </listitem>
550 </itemizedlist>
551 </sect3>
552
553 <sect3>
554 <title>hpc</title>
555 <itemizedlist>
556 <listitem>
557 <para>
558 Version number XXXX (was XXXX)
559 </para>
560 </listitem>
561 </itemizedlist>
562 </sect3>
563
564 <sect3>
565 <title>integer-gmp</title>
566 <itemizedlist>
567 <listitem>
568 <para>
569 Version number XXXX (was XXXX)
570 </para>
571 </listitem>
572 </itemizedlist>
573 </sect3>
574
575 <sect3>
576 <title>old-locale</title>
577 <itemizedlist>
578 <listitem>
579 <para>
580 Version number XXXX (was XXXX)
581 </para>
582 </listitem>
583 </itemizedlist>
584 </sect3>
585
586 <sect3>
587 <title>old-time</title>
588 <itemizedlist>
589 <listitem>
590 <para>
591 Version number XXXX (was XXXX)
592 </para>
593 </listitem>
594 </itemizedlist>
595 </sect3>
596
597 <sect3>
598 <title>process</title>
599 <itemizedlist>
600 <listitem>
601 <para>
602 Version number XXXX (was XXXX)
603 </para>
604 </listitem>
605 </itemizedlist>
606 </sect3>
607
608 <sect3>
609 <title>template-haskell</title>
610 <itemizedlist>
611 <listitem>
612 <para>
613 Version number XXXX (was XXXX)
614 </para>
615 </listitem>
616 </itemizedlist>
617 </sect3>
618
619 <sect3>
620 <title>time</title>
621 <itemizedlist>
622 <listitem>
623 <para>
624 Version number XXXX (was XXXX)
625 </para>
626 </listitem>
627 </itemizedlist>
628 </sect3>
629
630 <sect3>
631 <title>unix</title>
632 <itemizedlist>
633 <listitem>
634 <para>
635 Version number 2.7.0.0 (was 2.6.0.0)
636 </para>
637 </listitem>
638 <listitem>
639 <para>
640 A crash in <literal>getGroupEntryForID</literal>
641 (and related functions like
642 <literal>getUserEntryForID</literal> and
643 <literal>getUserEntryForName</literal>) in
644 multi-threaded applications has been fixed.
645 </para>
646 </listitem>
647 <listitem>
648 <para>
649 The functions <literal>getGroupEntryForID</literal>
650 and <literal>getUserEntryForID</literal> now fail
651 with a <literal>isDoesNotExist</literal> error when
652 the specified ID cannot be found.
653 </para>
654 </listitem>
655 </itemizedlist>
656 </sect3>
657
658 <sect3>
659 <title>Win32</title>
660 <itemizedlist>
661 <listitem>
662 <para>
663 Version number XXXX (was XXXX)
664 </para>
665 </listitem>
666 </itemizedlist>
667 </sect3>
668 </sect2>
669 </sect1>