Support wild cards in TH splices
[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 Implicit parameters of the new base type
40 <literal>GHC.Stack.CallStack</literal> are treated
41 specially, and automatically solved for the current source
42 location. For example
43 <programlisting>
44 f = print (?stk :: CallStack)
45 </programlisting>
46 will print the singleton stack containing the occurrence of
47 <literal>?stk</literal>. If there is another
48 <literal>CallStack</literal> implicit in-scope, the new location
49 will be appended to the existing stack, e.g.
50 <programlisting>
51 f :: (?stk :: CallStack) => IO ()
52 f = print (?stk :: CallStack)
53 </programlisting>
54 will print the occurrence of <literal>?stk</literal> and the
55 call-site of <literal>f</literal>. The name of the implicit
56 parameter does not matter.
57 </para>
58 <para>
59 See the release notes for base for a description of the
60 <literal>CallStack</literal> type.
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 To conform to the common case, the default role assigned to parameters
66 of datatypes declared in <literal>hs-boot</literal> files is
67 <literal>representational</literal>. However, if the constructor(s)
68 for the datatype are given, it makes sense to do normal role inference.
69 This is now implemented, effectively making the default role for
70 non-abstract datatypes in <literal>hs-boot</literal> files to be
71 <literal>phantom</literal>, like it is in regular Haskell code.
72 </para>
73 </listitem>
74 </itemizedlist>
75 </sect3>
76
77 <sect3>
78 <title>Compiler</title>
79 <itemizedlist>
80 <listitem>
81 <para>
82 Added the option <option>-dth-dec-file</option>.
83
84 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.
85 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.
86 </para>
87 </listitem>
88 <listitem>
89 <para>
90 Added the option <option>-fprint-expanded-types</option>.
91
92 When enabled, GHC also prints type-synonym-expanded types in
93 type errors.
94 </para>
95 </listitem>
96 </itemizedlist>
97 </sect3>
98
99 <sect3>
100 <title>GHCi</title>
101 <itemizedlist>
102 <listitem>
103 <para>
104 <literal>Main</literal> with an explicit module header but
105 without <literal>main</literal> is now an error (#7765).
106 </para>
107 <para>
108 The <literal>:back</literal> and <literal>:forward</literal>
109 commands now take an optional count allowing the user to move forward or
110 backward in history several steps at a time.
111 </para>
112 <para>
113 Added commands <literal>:load!</literal> and <literal>:reload!</literal>,
114 effectively setting "-fdefer-type-errors" before loading a module and
115 unsetting it after loading if it has not been set before (#8353).
116 </para>
117 </listitem>
118 </itemizedlist>
119 </sect3>
120
121 <sect3>
122 <title>Template Haskell</title>
123 <itemizedlist>
124 <listitem>
125 <para>
126 The <literal>TemplateHaskell</literal> now no longer automatically
127 errors when used with a stage 1 compiler (i.e. GHC without
128 interpreter support); in particular, plain
129 Haskell quotes (not quasi-quotes) can now be compiled without erroring.
130 Splices and quasi-quotes continue to only be supported by a
131 stage 2 compiler.
132 </para>
133 </listitem>
134 <listitem>
135 <para>
136 Partial type signatures can now be used in splices, see <xref linkend="pts-where"/>.
137 </para>
138 </listitem>
139 </itemizedlist>
140 </sect3>
141
142 <sect3>
143 <title>Runtime system</title>
144 <itemizedlist>
145 <listitem>
146 <para>
147 TODO FIXME.
148 </para>
149 </listitem>
150 </itemizedlist>
151 </sect3>
152
153 <sect3>
154 <title>Build system</title>
155 <itemizedlist>
156 <listitem>
157 <para>
158 TODO FIXME.
159 </para>
160 </listitem>
161 </itemizedlist>
162 </sect3>
163
164 <sect3>
165 <title>Package system</title>
166 <itemizedlist>
167 <listitem>
168 <para>
169 TODO FIXME.
170 </para>
171 </listitem>
172 </itemizedlist>
173 </sect3>
174 </sect2>
175
176 <sect2>
177 <title>Libraries</title>
178
179 <sect3>
180 <title>array</title>
181 <itemizedlist>
182 <listitem>
183 <para>
184 Version number XXXXX (was 0.5.0.0)
185 </para>
186 </listitem>
187 </itemizedlist>
188 </sect3>
189
190 <sect3>
191 <title>base</title>
192 <itemizedlist>
193 <listitem>
194 <para>
195 Version number XXXXX (was 4.7.0.0)
196 </para>
197 </listitem>
198 <listitem>
199 <para>
200 A new module <literal>GHC.SrcLoc</literal> was added,
201 exporting a new type <literal>SrcLoc</literal>. A
202 <literal>SrcLoc</literal> contains package, module,
203 and file names, as well as start and end positions.
204 </para>
205 </listitem>
206 <listitem>
207 <para>
208 A new type <literal>CallStack</literal> was added for use
209 with the new implicit callstack parameters. A
210 <literal>CallStack</literal> is a
211 <literal>[(String, SrcLoc)]</literal>, sorted by most-recent
212 call.
213 </para>
214 </listitem>
215 </itemizedlist>
216 </sect3>
217
218 <sect3>
219 <title>bin-package-db</title>
220 <itemizedlist>
221 <listitem>
222 <para>
223 This is an internal package, and should not be used.
224 </para>
225 </listitem>
226 </itemizedlist>
227 </sect3>
228
229 <sect3>
230 <title>binary</title>
231 <itemizedlist>
232 <listitem>
233 <para>
234 Version number XXXXX (was 0.7.1.0)
235 </para>
236 </listitem>
237 </itemizedlist>
238 </sect3>
239
240 <sect3>
241 <title>bytestring</title>
242 <itemizedlist>
243 <listitem>
244 <para>
245 Version number XXXXX (was 0.10.4.0)
246 </para>
247 </listitem>
248 </itemizedlist>
249 </sect3>
250
251 <sect3>
252 <title>Cabal</title>
253 <itemizedlist>
254 <listitem>
255 <para>
256 Version number XXXXX (was 1.18.1.3)
257 </para>
258 </listitem>
259 </itemizedlist>
260 </sect3>
261
262 <sect3>
263 <title>containers</title>
264 <itemizedlist>
265 <listitem>
266 <para>
267 Version number XXXXX (was 0.5.4.0)
268 </para>
269 </listitem>
270 </itemizedlist>
271 </sect3>
272
273 <sect3>
274 <title>deepseq</title>
275 <itemizedlist>
276 <listitem>
277 <para>
278 Version number XXXXX (was 1.3.0.2)
279 </para>
280 </listitem>
281 </itemizedlist>
282 </sect3>
283
284 <sect3>
285 <title>directory</title>
286 <itemizedlist>
287 <listitem>
288 <para>
289 Version number XXXXX (was 1.2.0.2)
290 </para>
291 </listitem>
292 </itemizedlist>
293 </sect3>
294
295 <sect3>
296 <title>filepath</title>
297 <itemizedlist>
298 <listitem>
299 <para>
300 Version number XXXXX (was 1.3.0.2)
301 </para>
302 </listitem>
303 </itemizedlist>
304 </sect3>
305
306 <sect3>
307 <title>ghc</title>
308 <itemizedlist>
309 <listitem>
310 <para>
311 TODO FIXME.
312 </para>
313 </listitem>
314 </itemizedlist>
315 </sect3>
316
317 <sect3>
318 <title>ghc-prim</title>
319 <itemizedlist>
320 <listitem>
321 <para>
322 Version number XXXXX (was 0.3.1.0)
323 </para>
324 </listitem>
325 </itemizedlist>
326 </sect3>
327
328 <sect3>
329 <title>haskell98</title>
330 <itemizedlist>
331 <listitem>
332 <para>
333 Version number XXXXX (was 2.0.0.3)
334 </para>
335 </listitem>
336 </itemizedlist>
337 </sect3>
338
339 <sect3>
340 <title>haskell2010</title>
341 <itemizedlist>
342 <listitem>
343 <para>
344 Version number XXXXX (was 1.1.1.1)
345 </para>
346 </listitem>
347 </itemizedlist>
348 </sect3>
349
350 <sect3>
351 <title>hoopl</title>
352 <itemizedlist>
353 <listitem>
354 <para>
355 Version number XXXXX (was 3.10.0.0)
356 </para>
357 </listitem>
358 </itemizedlist>
359 </sect3>
360
361 <sect3>
362 <title>hpc</title>
363 <itemizedlist>
364 <listitem>
365 <para>
366 Version number XXXXX (was 0.6.0.1)
367 </para>
368 </listitem>
369 </itemizedlist>
370 </sect3>
371
372 <sect3>
373 <title>integer-gmp</title>
374 <itemizedlist>
375 <listitem>
376 <para>
377 Version number XXXXX (was 0.5.1.0)
378 </para>
379 </listitem>
380 </itemizedlist>
381 </sect3>
382
383 <sect3>
384 <title>old-locale</title>
385 <itemizedlist>
386 <listitem>
387 <para>
388 Version number XXXXX (was 1.0.0.6)
389 </para>
390 </listitem>
391 </itemizedlist>
392 </sect3>
393
394 <sect3>
395 <title>old-time</title>
396 <itemizedlist>
397 <listitem>
398 <para>
399 Version number XXXXX (was 1.1.0.2)
400 </para>
401 </listitem>
402 </itemizedlist>
403 </sect3>
404
405 <sect3>
406 <title>process</title>
407 <itemizedlist>
408 <listitem>
409 <para>
410 Version number XXXXX (was 1.2.0.0)
411 </para>
412 </listitem>
413 </itemizedlist>
414 </sect3>
415
416 <sect3>
417 <title>template-haskell</title>
418 <itemizedlist>
419 <listitem>
420 <para>
421 Version number XXXXX (was 2.9.0.0)
422 </para>
423 </listitem>
424 <listitem>
425 <para>
426 The <literal>Lift</literal> type class for lifting values
427 into Template Haskell splices now has a default signature
428 <literal>lift :: Data a => a -> Q Exp</literal>, which means
429 that you do not have to provide an explicit implementation
430 of <literal>lift</literal> for types which have a <literal>Data</literal>
431 instance. To manually use this default implementation, you
432 can use the <literal>liftData</literal> function which is
433 now exported from <literal>Language.Haskell.TH.Syntax</literal>.
434 </para>
435 </listitem>
436 </itemizedlist>
437 </sect3>
438
439 <sect3>
440 <title>time</title>
441 <itemizedlist>
442 <listitem>
443 <para>
444 Version number XXXXX (was 1.4.1)
445 </para>
446 </listitem>
447 </itemizedlist>
448 </sect3>
449
450 <sect3>
451 <title>unix</title>
452 <itemizedlist>
453 <listitem>
454 <para>
455 Version number XXXXX (was 2.7.0.0)
456 </para>
457 </listitem>
458 </itemizedlist>
459 </sect3>
460
461 <sect3>
462 <title>Win32</title>
463 <itemizedlist>
464 <listitem>
465 <para>
466 Version number XXXXX (was 2.3.0.1)
467 </para>
468 </listitem>
469 </itemizedlist>
470 </sect3>
471 </sect2>
472
473 <sect2>
474 <title>Known bugs</title>
475 <itemizedlist>
476 <listitem>
477 <para>
478 TODO FIXME
479 </para>
480 </listitem>
481 </itemizedlist>
482 </sect2>
483 </sect1>