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
|
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="release-5-04">
<title>Release notes for version 5.04</title>
<sect2>
<title>User-visible compiler changes</title>
<itemizedlist>
<listitem>
<para>Full support for MacOS X, including fully optimized compilation, has been added. Only a native
code generator and support for <option>-split-objs</option> is still missing.
Everything else needs more testing, but should work.</para>
</listitem>
<listitem>
<para><literal>ghc-pkg</literal>: new options
<option>--auto-ghci-libs</option>,
<option>-u</option>/<option>--update-package</option>,
<option>--force</option>, and
<option>-i</option>/<option>--input-file</option>, and
suppport for expanding environment variables in package
descriptions. See <xref linkend="packages">).</para>
</listitem>
<listitem>
<para>The latest version of the FFI spec is fully supported.
The syntax of FFI declarations has changed accordingly. The
old syntax is still accepted for the time being, but will
elicit a warning from the compiler.</para>
</listitem>
<listitem>
<para>New option: <option>-F</option> specifies a user-defined
preprocessing phase (see <xref linkend="pre-processor">).</para>
</listitem>
<listitem>
<para>Major overhaul of the heap profiling subsystem, with new
facilities for retainer profiling and biographical profiling
(ala nhc98, albeit with a couple of omissions). The syntax of
the runtime heap-profiling options has changed. See <xref
linkend="prof-heap">.</para>
</listitem>
<listitem>
<para>The type system now supports full rank-N types
(previously only limited rank-2 types were supported). See
<xref linkend="universal-quantification">.</para>
</listitem>
<listitem>
<para>Explicit kind annotations can now be given on any
binding occurrence of a type variable. See <xref
linkend="sec-kinding">.</para>
</listitem>
<listitem>
<para>The handling of type synonyms has been rationalised.
See <xref linkend="type-synonyms">.</para>
</listitem>
<listitem>
<para>Fixes for several space leaks in the compiler itself
(these fixes were also merged into 5.02.3).</para>
</listitem>
<listitem>
<para>It is now possible to derive arbitrary classes for
newtypes. See <xref linkend="newtype-deriving">.</para>
</listitem>
<listitem>
<para>Deadlock is now an exception, rather than a return
status from the scheduler. See the module
<literal>Control.Exception</literal> in the library
documentation for more details.</para>
</listitem>
<listitem>
<para>The syntax and behaviour of <literal>RULE</literal>
pragmas has changed slightly. See <xref
linkend="rewrite-rules">.</para>
</listitem>
<listitem>
<para>Interface files are now in a binary format to reduce
compilation times. To view an interface file in plain text,
use the <option>--show-iface</option> flag.</para>
</listitem>
<listitem>
<para>A restriction on the form of class declarations has been
lifted. In Haskell 98, it is illegal for class method types
to mention constraints on the class type variable. eg.</para>
<programlisting>
class Seq s a where
elem :: Eq a => a -> s a -> Bool
</programlisting>
<para>This restriction has now been lifted in GHC.</para>
</listitem>
<listitem>
<para>Main threads can now receive the
<literal>BlockedOnDeadMVar</literal> exception in the same way
as other threads.</para>
</listitem>
<listitem>
<para>The <option>-fall-strict</option> flag never really
worked, and has been removed.</para>
</listitem>
<listitem>
<para>The syntax of <literal>.hi-boot</literal> files is now
much clearer and Haskell-like. See <xref
linkend="mutual-recursion">.</para>
</listitem>
<listitem>
<para>There is a new flag <option>-fffi</option> which enables
FFI support without turning on the rest of the GHC
extensions.</para>
</listitem>
<listitem>
<para>The syntax for implicit parameter bindings has changed.
Previously the keyword <literal>with</literal> was used to
introduce implicit bindings, but now implicit bindings may be
introduced using <literal>let</literal> (see <xref
linkend="implicit-parameters">). As a result of this,
<literal>with</literal> is no longer a keyword when
<option>-fglasgow-exts</option> is turned on.</para>
<para>The option <literal>-fwith</literal> may be used to
restore the old behaviour.</para>
</listitem>
<listitem>
<para>Infix type constructors are now allowed, and must begin
with a colon (as with data constructors). See <xref
linkend="infix-tycons">.</para>
</listitem>
<listitem>
<para>The <literal>do</literal>-notation syntax is now
rebindable in the same way as other built-in syntax. See
<xref linkend="rebindable-syntax">.</para>
</listitem>
<listitem>
<para>Support for using “frameworks” on
Darwin/MacOS X has been added. See the
<option>-framework</option> option in <xref
linkend="options-linker">, and the
<literal>framework_dirs</literal> field of a package spec in
<xref linkend="package-management">.</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>User-visible interpreter (GHCi) changes</title>
<itemizedlist>
<listitem>
<para>New commands: <literal>:browse</literal>, <literal>:set
args</literal>, <literal>:set prog</literal>, <literal>:show
bindings</literal>, and <literal>:show modules</literal> (see
<xref linkend="ghci-commands">).</para>
</listitem>
<listitem>
<para>There is a much more flexible mechanism for manipulating
the scope for expressions typed at the prompt. For example,
one can now have both the <literal>Prelude</literal> and the
exports of several compiled modules in scope at the same
time. See <xref linkend="ghci-scope">.</para>
</listitem>
<listitem>
<para>GHCi now supports <literal>foreign import
"wrapper"</literal> FFI declarations.</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>User-visible library changes</title>
<itemizedlist>
<listitem>
<para>GHC is in the process of moving to a new hierarchical
set of libraries. At the moment, we have two sets of
libraries, both described in accompanying documents:</para>
<itemizedlist>
<listitem>
<para>The “new libraries” which are
hierarchical and consist of the following packages:
<literal>base</literal>, <literal>haskell98</literal>,
<literal>haskell-src</literal>, and
<literal>network</literal>. Broadly speaking,
<literal>base</literal> contains the
<literal>Prelude</literal>, standard libraries and most of
the contents of the old <literal>lang</literal>
package. By default, the <literal>base</literal> and
<literal>haskell98</literal> packages are enabled.</para>
</listitem>
<listitem>
<para>The <literal>hslibs</literal>, most of which are now
deprecated. Where possible, new code should be written to
use the new libraries instead. </para>
<para>The following libraries in <literal>hslibs</literal>
have not moved yet:</para>
<itemizedlist>
<listitem>
<para>The packages <literal>win32</literal>,
<literal>xlib</literal>, <literal>graphics</literal>,
and <literal>posix</literal>.</para>
</listitem>
<listitem>
<para>The Edison libraries in the
<literal>data</literal> package.</para>
</listitem>
<listitem>
<para>In the <literal>lang</literal> package, the
modules <literal>TimeExts</literal>,
<literal>DirectoryExts</literal>,
<literal>SystemExts</literal>, and
<literal>NumExts</literal>.</para>
</listitem>
<listitem>
<para>The HaXml libraries in the
<literal>text</literal> package.</para>
</listitem>
<listitem>
<para>In the <literal>util</literal> package, the
modules <literal>MD5</literal>,
<literal>Select</literal>, <literal>Memo</literal>,
<literal>Observe</literal>, and
<literal>Readline</literal>.</para>
</listitem>
</itemizedlist>
<para>All other libraries from <literal>hslibs</literal>
either have equivalents in the new libraries (see the
<literal>hslibs</literal> docs for details), or were
already deprecated and hence were not moved into the new
hierarchy.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>The <literal>Read</literal> class is now based on a
parsing combinator library which is vastly more efficient than
the previous one. See the modules
<literal>Text.Read</literal>.
<literal>Text.ParserCombinators.ReadP</literal>, and
<literal>Text.ParserCombinators.ReadPrec</literal> in the
library documentation.</para>
<para>The code generated by the compiler for derived
<literal>Read</literal> instances should be much shorter than
before.</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>New experimental features</title>
<itemizedlist>
<listitem>
<para>Linear implicit parameters. See <xref
linkend="linear-implicit-parameters">.</para>
</listitem>
<listitem>
<para>The RTS has support for running in a multi-threaded
environment and making non-blocking (from Haskell's point of
view) calls to foreign C functions which would normally block.
To enable this behaviour, configure with the
<option>--enable-threaded-rts</option> option.</para>
</listitem>
<listitem>
<para>The compiler can now read in files containing Core
syntax (such as those produced by the
<option>-fext-core</option> option) and compile them. Input
files with the <literal>.hcr</literal> file extension are
assumed to contain Core syntax.</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Internal changes</title>
<itemizedlist>
<listitem>
<para>Happy 1.13 is now required to build GHC, because of the
change in names of certain libraries.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<!-- Emacs stuff:
;;; Local Variables: ***
;;; mode: xml ***
;;; sgml-parent-document: ("users_guide.xml" "book" "chapter" "sect1") ***
;;; End: ***
-->
|