386095e1d91837c986d722d7537f82610ed1d203
[ghc.git] / docs / users_guide / 7.12.1-notes.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <sect1 id="release-7-12-1">
3 <title>Release notes for version 7.12.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.10 branch.
9 </para>
10
11 <sect2>
12 <title>Highlights</title>
13
14 <para>
15 The highlights, since the 7.10 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 TODO FIXME.
35 </para>
36 </listitem>
37 <listitem>
38 <para>
39 The parser now supports Haddock comments on GADT data constructors. For example,
40 <programlisting>
41 data Expr a where
42 -- | Just a normal sum
43 Sum :: Int -> Int -> Expr Int
44 </programlisting>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Implicit parameters of the new base type
50 <literal>GHC.Stack.CallStack</literal> are treated
51 specially, and automatically solved for the current source
52 location. For example
53 <programlisting>
54 f = print (?stk :: CallStack)
55 </programlisting>
56 will print the singleton stack containing the occurrence of
57 <literal>?stk</literal>. If there is another
58 <literal>CallStack</literal> implicit in-scope, the new location
59 will be appended to the existing stack, e.g.
60 <programlisting>
61 f :: (?stk :: CallStack) => IO ()
62 f = print (?stk :: CallStack)
63 </programlisting>
64 will print the occurrence of <literal>?stk</literal> and the
65 call-site of <literal>f</literal>. The name of the implicit
66 parameter does not matter.
67 </para>
68 <para>
69 See the release notes for base for a description of the
70 <literal>CallStack</literal> type.
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 To conform to the common case, the default role assigned to parameters
76 of datatypes declared in <literal>hs-boot</literal> files is
77 <literal>representational</literal>. However, if the constructor(s)
78 for the datatype are given, it makes sense to do normal role inference.
79 This is now implemented, effectively making the default role for
80 non-abstract datatypes in <literal>hs-boot</literal> files to be
81 <literal>phantom</literal>, like it is in regular Haskell code.
82 </para>
83 </listitem>
84 <listitem>
85 <para>
86 Wildcards can be used in the type arguments of type/data
87 family instance declarations to indicate that the name of a
88 type variable doesn't matter. They will be replaced with new
89 unique type variables. See <xref
90 linkend="data-instance-declarations"/> for more details.
91 </para>
92 </listitem>
93 </itemizedlist>
94 </sect3>
95
96 <sect3>
97 <title>Compiler</title>
98 <itemizedlist>
99 <listitem>
100 <para>
101 Added the option <option>-dth-dec-file</option>.
102
103 This dumps out a .th.hs file of all Template Haskell declarations in a corresponding .hs file. The idea is that application developers can check this into their repository so that they can grep for identifiers used elsewhere that were defined in Template Haskell.
104 This is similar to using <option>-ddump-to-file</option> with <option>-ddump-splices</option> but it always generates a file instead of being coupled to <option>-ddump-to-file</option> and only outputs code that does not exist in the .hs file and a comment for the splice location in the original file.
105 </para>
106 </listitem>
107 <listitem>
108 <para>
109 Added the option <option>-fprint-expanded-types</option>.
110
111 When enabled, GHC also prints type-synonym-expanded types in
112 type errors.
113 </para>
114 </listitem>
115 <listitem>
116 <para>
117 Added the option <option>-fcpr-anal</option>.
118
119 When enabled, the demand analyser performs CPR analysis.
120 It is implied by <option>-O</option>. Consequently,
121 <option>-fcpr-off</option> is now removed, run with
122 <option>-fno-cpr-anal</option> to get the old
123 <option>-fcpr-off</option> behaviour.
124 </para>
125 </listitem>
126 </itemizedlist>
127 </sect3>
128
129 <sect3>
130 <title>GHCi</title>
131 <itemizedlist>
132 <listitem>
133 <para>
134 <literal>Main</literal> with an explicit module header but
135 without <literal>main</literal> is now an error (#7765).
136 </para>
137 <para>
138 The <literal>:back</literal> and <literal>:forward</literal>
139 commands now take an optional count allowing the user to move forward or
140 backward in history several steps at a time.
141 </para>
142 <para>
143 Added commands <literal>:load!</literal> and <literal>:reload!</literal>,
144 effectively setting "-fdefer-type-errors" before loading a module and
145 unsetting it after loading if it has not been set before (#8353).
146 </para>
147 </listitem>
148 </itemizedlist>
149 </sect3>
150
151 <sect3>
152 <title>Template Haskell</title>
153 <itemizedlist>
154 <listitem>
155 <para>
156 The <literal>TemplateHaskell</literal> now no longer automatically
157 errors when used with a stage 1 compiler (i.e. GHC without
158 interpreter support); in particular, plain
159 Haskell quotes (not quasi-quotes) can now be compiled without erroring.
160 Splices and quasi-quotes continue to only be supported by a
161 stage 2 compiler.
162 </para>
163 </listitem>
164 <listitem>
165 <para>
166 Partial type signatures can now be used in splices, see <xref linkend="pts-where"/>.
167 </para>
168 </listitem>
169 <listitem>
170 <para>
171 <literal>Template Haskell</literal> now supports the use of
172 <literal>UInfixT</literal> in types to resolve infix
173 operator fixities, in the same vein as
174 <literal>UInfixP</literal> and <literal>UInfixE</literal>
175 in patterns and expressions. <literal>ParensT</literal>
176 and <literal>InfixT</literal> have also been introduced,
177 serving the same functions as their pattern and expression
178 counterparts.
179 </para>
180 </listitem>
181 <listitem>
182 <para>
183 Primitive chars (e.g., <literal>[| 'a'# |]</literal>) and
184 primitive strings (e.g., <literal>[| "abc"# |]</literal>)
185 can now be quoted with Template Haskell. The
186 <literal>Lit</literal> data type also has a new
187 constructor, <literal>CharPrimL</literal>, for primitive
188 char literals.
189 </para>
190 </listitem>
191 </itemizedlist>
192 </sect3>
193
194 <sect3>
195 <title>Runtime system</title>
196 <itemizedlist>
197 <listitem>
198 <para>
199 TODO FIXME.
200 </para>
201 </listitem>
202 </itemizedlist>
203 </sect3>
204
205 <sect3>
206 <title>Build system</title>
207 <itemizedlist>
208 <listitem>
209 <para>
210 TODO FIXME.
211 </para>
212 </listitem>
213 </itemizedlist>
214 </sect3>
215
216 <sect3>
217 <title>Package system</title>
218 <itemizedlist>
219 <listitem>
220 <para>
221 TODO FIXME.
222 </para>
223 </listitem>
224 </itemizedlist>
225 </sect3>
226 </sect2>
227
228 <sect2>
229 <title>Libraries</title>
230
231 <sect3>
232 <title>array</title>
233 <itemizedlist>
234 <listitem>
235 <para>
236 Version number XXXXX (was 0.5.0.0)
237 </para>
238 </listitem>
239 </itemizedlist>
240 </sect3>
241
242 <sect3>
243 <title>base</title>
244 <itemizedlist>
245 <listitem>
246 <para>
247 Version number XXXXX (was 4.7.0.0)
248 </para>
249 </listitem>
250 <listitem>
251 <para>
252 A new module <literal>GHC.SrcLoc</literal> was added,
253 exporting a new type <literal>SrcLoc</literal>. A
254 <literal>SrcLoc</literal> contains package, module,
255 and file names, as well as start and end positions.
256 </para>
257 </listitem>
258 <listitem>
259 <para>
260 A new type <literal>CallStack</literal> was added for use
261 with the new implicit callstack parameters. A
262 <literal>CallStack</literal> is a
263 <literal>[(String, SrcLoc)]</literal>, sorted by most-recent
264 call.
265 </para>
266 </listitem>
267 <listitem>
268 <para>
269 A new function, <literal>interruptible</literal>, was added
270 to <literal>GHC.IO</literal> allowing an
271 <literal>IO</literal> action to be run such that it can be
272 interrupted by an asynchronous exception, even if exceptions
273 are masked (except if masked with
274 <literal>interruptibleMask</literal>).
275 </para>
276 <para>
277 This was introduced to fix the behavior of
278 <literal>allowInterrupt</literal>, which would previously
279 incorrectly allow exceptions in uninterruptible regions
280 (see Trac #9516).
281 </para>
282 </listitem>
283 </itemizedlist>
284 </sect3>
285
286 <sect3>
287 <title>bin-package-db</title>
288 <itemizedlist>
289 <listitem>
290 <para>
291 This is an internal package, and should not be used.
292 </para>
293 </listitem>
294 </itemizedlist>
295 </sect3>
296
297 <sect3>
298 <title>binary</title>
299 <itemizedlist>
300 <listitem>
301 <para>
302 Version number XXXXX (was 0.7.1.0)
303 </para>
304 </listitem>
305 </itemizedlist>
306 </sect3>
307
308 <sect3>
309 <title>bytestring</title>
310 <itemizedlist>
311 <listitem>
312 <para>
313 Version number XXXXX (was 0.10.4.0)
314 </para>
315 </listitem>
316 </itemizedlist>
317 </sect3>
318
319 <sect3>
320 <title>Cabal</title>
321 <itemizedlist>
322 <listitem>
323 <para>
324 Version number XXXXX (was 1.18.1.3)
325 </para>
326 </listitem>
327 </itemizedlist>
328 </sect3>
329
330 <sect3>
331 <title>containers</title>
332 <itemizedlist>
333 <listitem>
334 <para>
335 Version number XXXXX (was 0.5.4.0)
336 </para>
337 </listitem>
338 </itemizedlist>
339 </sect3>
340
341 <sect3>
342 <title>deepseq</title>
343 <itemizedlist>
344 <listitem>
345 <para>
346 Version number XXXXX (was 1.3.0.2)
347 </para>
348 </listitem>
349 </itemizedlist>
350 </sect3>
351
352 <sect3>
353 <title>directory</title>
354 <itemizedlist>
355 <listitem>
356 <para>
357 Version number XXXXX (was 1.2.0.2)
358 </para>
359 </listitem>
360 </itemizedlist>
361 </sect3>
362
363 <sect3>
364 <title>filepath</title>
365 <itemizedlist>
366 <listitem>
367 <para>
368 Version number XXXXX (was 1.3.0.2)
369 </para>
370 </listitem>
371 </itemizedlist>
372 </sect3>
373
374 <sect3>
375 <title>ghc</title>
376 <itemizedlist>
377 <listitem>
378 <para>
379 TODO FIXME.
380 </para>
381 </listitem>
382 <listitem>
383 <para>
384 The <literal>HsBang</literal> type has been removed in
385 favour of <literal>HsSrcBang</literal> and
386 <literal>HsImplBang</literal>. Data constructors now
387 always carry around their strictness annotations as
388 the user wrote them, whether from an imported module
389 or not.
390 </para>
391 </listitem>
392 </itemizedlist>
393 </sect3>
394
395 <sect3>
396 <title>ghc-prim</title>
397 <itemizedlist>
398 <listitem>
399 <para>
400 Version number XXXXX (was 0.3.1.0)
401 </para>
402 </listitem>
403 </itemizedlist>
404 </sect3>
405
406 <sect3>
407 <title>haskell98</title>
408 <itemizedlist>
409 <listitem>
410 <para>
411 Version number XXXXX (was 2.0.0.3)
412 </para>
413 </listitem>
414 </itemizedlist>
415 </sect3>
416
417 <sect3>
418 <title>haskell2010</title>
419 <itemizedlist>
420 <listitem>
421 <para>
422 Version number XXXXX (was 1.1.1.1)
423 </para>
424 </listitem>
425 </itemizedlist>
426 </sect3>
427
428 <sect3>
429 <title>hoopl</title>
430 <itemizedlist>
431 <listitem>
432 <para>
433 Version number XXXXX (was 3.10.0.0)
434 </para>
435 </listitem>
436 </itemizedlist>
437 </sect3>
438
439 <sect3>
440 <title>hpc</title>
441 <itemizedlist>
442 <listitem>
443 <para>
444 Version number XXXXX (was 0.6.0.1)
445 </para>
446 </listitem>
447 </itemizedlist>
448 </sect3>
449
450 <sect3>
451 <title>integer-gmp</title>
452 <itemizedlist>
453 <listitem>
454 <para>
455 Version number XXXXX (was 0.5.1.0)
456 </para>
457 </listitem>
458 </itemizedlist>
459 </sect3>
460
461 <sect3>
462 <title>old-locale</title>
463 <itemizedlist>
464 <listitem>
465 <para>
466 Version number XXXXX (was 1.0.0.6)
467 </para>
468 </listitem>
469 </itemizedlist>
470 </sect3>
471
472 <sect3>
473 <title>old-time</title>
474 <itemizedlist>
475 <listitem>
476 <para>
477 Version number XXXXX (was 1.1.0.2)
478 </para>
479 </listitem>
480 </itemizedlist>
481 </sect3>
482
483 <sect3>
484 <title>process</title>
485 <itemizedlist>
486 <listitem>
487 <para>
488 Version number XXXXX (was 1.2.0.0)
489 </para>
490 </listitem>
491 </itemizedlist>
492 </sect3>
493
494 <sect3>
495 <title>template-haskell</title>
496 <itemizedlist>
497 <listitem>
498 <para>
499 Version number XXXXX (was 2.9.0.0)
500 </para>
501 </listitem>
502 <listitem>
503 <para>
504 The <literal>Lift</literal> type class for lifting values
505 into Template Haskell splices now has a default signature
506 <literal>lift :: Data a => a -> Q Exp</literal>, which means
507 that you do not have to provide an explicit implementation
508 of <literal>lift</literal> for types which have a <literal>Data</literal>
509 instance. To manually use this default implementation, you
510 can use the <literal>liftData</literal> function which is
511 now exported from <literal>Language.Haskell.TH.Syntax</literal>.
512 </para>
513 </listitem>
514 <listitem>
515 <para>
516 <literal>Info</literal>'s constructors no longer have
517 <literal>Fixity</literal> fields. A <literal>qReifyFixity
518 </literal> function was added to the <literal>Quasi
519 </literal> type class (as well as the <literal>reifyFixity
520 </literal> function, specialized for <literal>Q</literal>)
521 to allow lookup of fixity information for any given
522 <literal>Name</literal>.
523 </para>
524 </listitem>
525 </itemizedlist>
526 </sect3>
527
528 <sect3>
529 <title>time</title>
530 <itemizedlist>
531 <listitem>
532 <para>
533 Version number XXXXX (was 1.4.1)
534 </para>
535 </listitem>
536 </itemizedlist>
537 </sect3>
538
539 <sect3>
540 <title>unix</title>
541 <itemizedlist>
542 <listitem>
543 <para>
544 Version number XXXXX (was 2.7.0.0)
545 </para>
546 </listitem>
547 </itemizedlist>
548 </sect3>
549
550 <sect3>
551 <title>Win32</title>
552 <itemizedlist>
553 <listitem>
554 <para>
555 Version number XXXXX (was 2.3.0.1)
556 </para>
557 </listitem>
558 </itemizedlist>
559 </sect3>
560 </sect2>
561
562 <sect2>
563 <title>Known bugs</title>
564 <itemizedlist>
565 <listitem>
566 <para>
567 TODO FIXME
568 </para>
569 </listitem>
570 </itemizedlist>
571 </sect2>
572 </sect1>