4b823294fded5e29e7d813ebbb28f2e8ff292b34
[ghc.git] / docs / users_guide / 7.10.1-notes.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-7-10-1">
3 <title>Release notes for version 7.10.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.8 branch.
9 </para>
10
11 <sect2>
12 <title>Highlights</title>
13
14 <para>
15 The highlights, since the 7.8 branch, are:
16 </para>
17
18 <itemizedlist>
19 <listitem>
20 <para>
21 TODO FIXME
22 </para>
23 </listitem>
24 </itemizedlist>
25 </sect2>
26
27 <sect2>
28 <title>Full details</title>
29 <sect3>
30 <title>Language</title>
31 <itemizedlist>
32 <listitem>
33 <para>
34 Added support for <link linkend="binary-literals">binary integer literals</link>
35 </para>
36 </listitem>
37 <listitem>
38 <para>
39 Simplified rules for implicit quantification. In previous versions of GHC,
40 it was possible to use the <literal>=></literal> arrow
41 to quantify over type variables in <literal>data</literal> and
42 <literal>type</literal> declarations without a
43 <literal>forall</literal> quantifier. For example,
44 <literal>data Fun = Fun (Ord a => a -> b)</literal> was identical to
45 <literal>data Fun = Fun (forall a b. Ord a => a -> b)</literal>, while
46 <literal>data Fun = Fun (a -> b)</literal> caused a not-in-scope error.
47 This implicit quantification is now deprecated, and variables
48 in higher-rank constructors should be quantified with <literal>forall</literal>
49 regardless of whether a class context is present or not.
50 GHC 7.10 raises a warning (controlled by
51 <option>-fwarn-context-quantification</option>, enabled by default)
52 and GHC 7.12 will raise an error. See <link linkend="univ">examples</link>
53 in GHC documentation.
54 </para>
55 <para>
56 The change also applies to Template Haskell splices such as
57 <literal>[t|Ord a => a|]</literal>, which should be written as
58 <literal>[t|forall a. Ord a => a|]</literal>.
59 </para>
60 </listitem>
61 </itemizedlist>
62 </sect3>
63
64 <sect3>
65 <title>Compiler</title>
66 <itemizedlist>
67 <listitem>
68 <para>
69 GHC now checks that all the language extensions required for
70 the inferred type signatures are explicitly enabled. This
71 means that if any of the type signatures inferred in your
72 program requires some language extension you will need to
73 enable it. The motivation is that adding a missing type
74 signature inferred by GHC should yield a program that
75 typechecks. Previously this was not the case.
76 </para>
77 <para>
78 This is a breaking change. Code that used to compile in the
79 past might fail with an error message requiring some
80 particular language extension (most likely
81 <option>-XTypeFamilies</option>, <option>-XGADTs</option> or
82 <option>-XFlexibleContexts</option>).
83 </para>
84 </listitem>
85 <listitem>
86 <para>
87 <option>-fwarn-tabs</option> warning flag is turned on by
88 default with this release of GHC. It can be suppressed
89 either by using <literal>GHC_OPTIONS</literal> pragma or by
90 specifying <option>-fno-warn-tabs</option> flag.
91 </para>
92 </listitem>
93 <listitem>
94 <para>
95 A new warning flag, <option>-fwarn-trustworthy-safe</option>
96 has been added and is turned on with
97 <option>-Wall</option>. It warns when a module that is
98 compiled with <option>-XTrustworthy</option> is actually
99 infered as an <option>-XSafe</option> module. This lets the
100 module author know that they can tighten their Safe Haskell
101 bounds if desired.
102 </para>
103 </listitem>
104 <listitem>
105 <para>
106 The <option>-fwarn-safe</option> and
107 <option>-fwarn-unsafe</option> that warn if a module was
108 infered as Safe or Unsafe have been improved to work with
109 all Safe Haskell module types. Previously, they only worked
110 for unmarked modules where the compiler was infering the
111 modules Safe Haskell type. They now work even for modules
112 marked as <option>-XTrustworthy</option> or
113 <option>-XUnsafe</option>. This is useful either to have
114 GHC check your assumptions, or to generate a list of
115 reasons easily why a module is regarded as Unsafe.
116 </para>
117 <para>
118 For many use cases, the new
119 <option>-fwarn-trustworthy-safe</option> flag is better
120 suited than either of these two.
121 </para>
122 </listitem>
123 <listitem>
124 <para>
125 <option>-ddump-simpl-phases</option> and
126 <option>-ddump-core-pipeline</option> flags have been removed.
127 </para>
128 </listitem>
129 <listitem>
130 <<<<<<< HEAD
131 <para>
132 Many more options have learned to respect the <option>-ddump-to-file</option>.
133 For example you can use <option>-ddump-to-file</option> with <option>-ddump-splices</option>
134 to produce a <option>.dump-splices file</option>
135 for each file that uses Template Haskell.
136 This should be much easier to understand on a larger project
137 than having everything being dumped to stdout.
138 </para>
139 </listitem>
140 <listitem>
141 <para>
142 Compiler plugins (with the <option>-fplugin</option>
143 flag) may now modify the behaviour of the constraint
144 solver, to add new functionality to GHC's
145 typechecker. See <xref linkend="typechecker-plugins"/>
146 for more details.
147 =======
148 <para>
149 A new warning flag, <option>-fwarn-missing-exported-sigs</option>
150 has been added. The behavior is similar to
151 <option>-fwarn-missing-signatures</option> but GHC will only
152 flag exported values. This flag takes precedence over
153 <option>-fwarn-missing-signatures</option> so it can be used
154 in conjunction with <option>-Wall</option>.
155 >>>>>>> 0551cf1... Add flag `-fwarn-missing-exported-sigs`
156 </para>
157 </listitem>
158 </itemizedlist>
159 </sect3>
160
161 <sect3>
162 <title>GHCi</title>
163 <itemizedlist>
164 <listitem>
165 <para>
166 TODO FIXME
167 </para>
168 </listitem>
169 </itemizedlist>
170 </sect3>
171
172 <sect3>
173 <title>Template Haskell</title>
174 <itemizedlist>
175 <listitem>
176 <para>
177 Added support for generating LINE pragma declarations
178 (<xref linkend="line-pragma"/>).
179 </para>
180
181 <para>
182 The type <literal>Pred</literal> (which stores a type
183 constraint) is now a synonym for <literal>Type</literal>,
184 in order to work with the <literal>ConstraintKinds</literal>
185 extension. This is a breaking change and may require
186 some rewriting of Template Haskell code.
187 </para>
188
189 <para>
190 <literal>reifyInstances</literal> now treats unbound type
191 variables as univerally quantified, allowing lookup of, say,
192 the instance for <literal>Eq [a]</literal>.
193 </para>
194
195 <para>
196 More kind annotations appear in reified types, in order to
197 disambiguate types that would otherwise be ambiguous in the
198 presence of <literal>PolyKinds</literal>. In particular, all
199 reified <literal>TyVarBndr</literal>s are now
200 <literal>KindedTV</literal>s. (This does not affect Template
201 Haskell quotations, just calls to <literal>reify</literal>.)
202 </para>
203
204 <para>
205 Various features unsupported in quotations were previously
206 silently ignored. These now cause errors.
207 </para>
208
209 <para>
210 <literal>Lift</literal> instances were added for
211 <literal>()</literal> and <literal>Ratio</literal>.
212 </para>
213
214 <para>
215 All Template Haskell datatypes now have
216 <literal>Generic</literal> instances.
217 </para>
218
219 <para>
220 Two new declaration forms are now supported:
221 standalone-deriving declarations and generic method
222 signatures (written using <literal>default</literal> in
223 a class). This means an expansion to the <literal>Dec</literal>
224 type.
225 </para>
226 </listitem>
227 </itemizedlist>
228 </sect3>
229
230 <sect3>
231 <title>Runtime system</title>
232 <itemizedlist>
233 <listitem>
234 <para>
235 TODO FIXME
236 </para>
237 </listitem>
238 </itemizedlist>
239 </sect3>
240
241 <sect3>
242 <title>Build system</title>
243 <itemizedlist>
244 <listitem>
245 <para>
246 <literal>ghc-pkg</literal> now respects <option>--user</option>
247 and <option>--global</option> when modifying packages (e.g.
248 changing exposed/trust flag or unregistering). Previously,
249 <literal>ghc-pkg</literal> would ignore these flags and modify
250 whichever package it found first on the database stack. To
251 recover the old behavior, simply omit these flags.
252 </para>
253 </listitem>
254 <listitem>
255 <para>
256 <literal>ghc-pkg</literal> accepts a <option>--user-package-db</option>
257 flag which allows a user to override the location of the user package
258 database. Unlike databases specified using <option>--package-db</option>,
259 a user package database configured this way respects
260 the <option>--user</option> flag.
261 </para>
262 </listitem>
263 </itemizedlist>
264 </sect3>
265
266 <sect3>
267 <title>Package system</title>
268 <itemizedlist>
269 <listitem>
270 <para>
271 TODO: cover module renaming, thinning, re-export etc
272 </para>
273 </listitem>
274 <listitem>
275 <para>
276 ghc-pkg (and ghc) have dropped support for single-file style
277 package databases. Since version 6.12, ghc-pkg has defaulted
278 to a new database format (using a directory of files, one per
279 package plus a binary cache).
280 </para>
281 <para>
282 This change will not affect programs and scripts that use
283 <literal>ghc-pkg init</literal> to create package databases.
284 </para>
285 <para>
286 This will affect scripts that create package databases
287 using tricks like
288 <programlisting>
289 echo "[]" > package.conf
290 </programlisting>
291 Such scripts will need to be modified to use
292 <literal>ghc-pkg init</literal>, and to delete databases
293 by directory removal, rather than simple file delete.
294 </para>
295 </listitem>
296 </itemizedlist>
297 </sect3>
298 </sect2>
299
300 <sect2>
301 <title>Libraries</title>
302
303 <sect3>
304 <title>array</title>
305 <itemizedlist>
306 <listitem>
307 <para>
308 Version number XXXXX (was 0.5.0.0)
309 </para>
310 </listitem>
311 </itemizedlist>
312 </sect3>
313
314 <sect3>
315 <title>base</title>
316 <itemizedlist>
317 <listitem>
318 <para>
319 Version number XXXXX (was 4.7.0.0)
320 </para>
321 </listitem>
322 <listitem>
323 <para>
324 GHC has had its internal Unicode database for
325 parsing updated to the Unicode 7.0 standard.
326 </para>
327 </listitem>
328 <listitem>
329 <para>
330 Attempting to access a portion of the result of
331 <literal>System.IO.hGetContents</literal> that was not yet
332 read when the handle was closed now throws an exception.
333 Previously, a lazy read from a closed handle would simply
334 end the result string, leading to silent or delayed
335 failures.
336 </para>
337 </listitem>
338 </itemizedlist>
339 </sect3>
340
341 <sect3>
342 <title>bin-package-db</title>
343 <itemizedlist>
344 <listitem>
345 <para>
346 This is an internal package, and should not be used.
347 </para>
348 </listitem>
349 </itemizedlist>
350 </sect3>
351
352 <sect3>
353 <title>binary</title>
354 <itemizedlist>
355 <listitem>
356 <para>
357 Version number XXXXX (was 0.7.1.0)
358 </para>
359 </listitem>
360 </itemizedlist>
361 </sect3>
362
363 <sect3>
364 <title>bytestring</title>
365 <itemizedlist>
366 <listitem>
367 <para>
368 Version number XXXXX (was 0.10.4.0)
369 </para>
370 </listitem>
371 </itemizedlist>
372 </sect3>
373
374 <sect3>
375 <title>Cabal</title>
376 <itemizedlist>
377 <listitem>
378 <para>
379 Version number XXXXX (was 1.18.1.3)
380 </para>
381 </listitem>
382 </itemizedlist>
383 </sect3>
384
385 <sect3>
386 <title>containers</title>
387 <itemizedlist>
388 <listitem>
389 <para>
390 Version number XXXXX (was 0.5.4.0)
391 </para>
392 </listitem>
393 </itemizedlist>
394 </sect3>
395
396 <sect3>
397 <title>deepseq</title>
398 <itemizedlist>
399 <listitem>
400 <para>
401 Version number XXXXX (was 1.3.0.2)
402 </para>
403 </listitem>
404 </itemizedlist>
405 </sect3>
406
407 <sect3>
408 <title>directory</title>
409 <itemizedlist>
410 <listitem>
411 <para>
412 Version number XXXXX (was 1.2.0.2)
413 </para>
414 </listitem>
415 </itemizedlist>
416 </sect3>
417
418 <sect3>
419 <title>filepath</title>
420 <itemizedlist>
421 <listitem>
422 <para>
423 Version number XXXXX (was 1.3.0.2)
424 </para>
425 </listitem>
426 </itemizedlist>
427 </sect3>
428
429 <sect3>
430 <title>ghc</title>
431 <itemizedlist>
432 <listitem>
433 <para>
434 Many internal functions in GHC related to package IDs have been
435 renamed to refer to package keys, e.g. <literal>PackageId</literal>
436 is now <literal>PackageKey</literal>, the wired-in names
437 such as <literal>primPackageId</literal> are now
438 <literal>primPackageKey</literal>, etc. This reflects a distinction
439 that we are now making: a package ID is, as before, the user-visible
440 ID from Cabal <literal>foo-1.0</literal>; a package key is now
441 a compiler-internal entity used for generating linking symbols, and
442 may not correspond at all to the package ID. In
443 particular, there may be multiple package keys per
444 package ID.
445 </para>
446 </listitem>
447 <listitem>
448 <para>
449 The ghc library no longer depends on the Cabal library. This means
450 that users of the ghc library are no longer forced to use the same
451 version of Cabal as ghc did. It also means that Cabal is freed up
452 to be able to depend on packages that ghc does not want to depend
453 on (which for example may enable improvements to Cabal's parsing
454 infrastructure).
455 </para>
456 </listitem>
457 </itemizedlist>
458 </sect3>
459
460 <sect3>
461 <title>ghc-prim</title>
462 <itemizedlist>
463 <listitem>
464 <para>
465 Version number XXXXX (was 0.3.1.0)
466 </para>
467 </listitem>
468 </itemizedlist>
469 </sect3>
470
471 <sect3>
472 <title>haskell98</title>
473 <itemizedlist>
474 <listitem>
475 <para>
476 Version number XXXXX (was 2.0.0.3)
477 </para>
478 </listitem>
479 </itemizedlist>
480 </sect3>
481
482 <sect3>
483 <title>haskell2010</title>
484 <itemizedlist>
485 <listitem>
486 <para>
487 Version number XXXXX (was 1.1.1.1)
488 </para>
489 </listitem>
490 </itemizedlist>
491 </sect3>
492
493 <sect3>
494 <title>hoopl</title>
495 <itemizedlist>
496 <listitem>
497 <para>
498 Version number XXXXX (was 3.10.0.0)
499 </para>
500 </listitem>
501 </itemizedlist>
502 </sect3>
503
504 <sect3>
505 <title>hpc</title>
506 <itemizedlist>
507 <listitem>
508 <para>
509 Version number XXXXX (was 0.6.0.1)
510 </para>
511 </listitem>
512 </itemizedlist>
513 </sect3>
514
515 <sect3>
516 <title>integer-gmp</title>
517 <itemizedlist>
518 <listitem>
519 <para>
520 Version number XXXXX (was 0.5.1.0)
521 </para>
522 </listitem>
523 </itemizedlist>
524 </sect3>
525
526 <sect3>
527 <title>old-locale</title>
528 <itemizedlist>
529 <listitem>
530 <para>
531 Version number XXXXX (was 1.0.0.6)
532 </para>
533 </listitem>
534 </itemizedlist>
535 </sect3>
536
537 <sect3>
538 <title>old-time</title>
539 <itemizedlist>
540 <listitem>
541 <para>
542 Version number XXXXX (was 1.1.0.2)
543 </para>
544 </listitem>
545 </itemizedlist>
546 </sect3>
547
548 <sect3>
549 <title>process</title>
550 <itemizedlist>
551 <listitem>
552 <para>
553 Version number XXXXX (was 1.2.0.0)
554 </para>
555 </listitem>
556 </itemizedlist>
557 </sect3>
558
559 <sect3>
560 <title>template-haskell</title>
561 <itemizedlist>
562 <listitem>
563 <para>
564 Version number XXXXX (was 2.9.0.0)
565 </para>
566 </listitem>
567 </itemizedlist>
568 </sect3>
569
570 <sect3>
571 <title>time</title>
572 <itemizedlist>
573 <listitem>
574 <para>
575 Version number XXXXX (was 1.4.1)
576 </para>
577 </listitem>
578 </itemizedlist>
579 </sect3>
580
581 <sect3>
582 <title>unix</title>
583 <itemizedlist>
584 <listitem>
585 <para>
586 Version number XXXXX (was 2.7.0.0)
587 </para>
588 </listitem>
589 </itemizedlist>
590 </sect3>
591
592 <sect3>
593 <title>Win32</title>
594 <itemizedlist>
595 <listitem>
596 <para>
597 Version number XXXXX (was 2.3.0.1)
598 </para>
599 </listitem>
600 </itemizedlist>
601 </sect3>
602 </sect2>
603
604 <sect2>
605 <title>Known bugs</title>
606 <itemizedlist>
607 <listitem>
608 <para>
609 TODO FIXME
610 </para>
611 </listitem>
612 </itemizedlist>
613 </sect2>
614 </sect1>