1 <sect1 id="release-5-04">
2 <title>Release notes for version 5.04</title>
5 <title>User-visible compiler changes</title>
8 <para>MacOS X support (Wolfgang, please fill in).</para>
11 <para><literal>ghc-pkg</literal>: new options
12 <option>--auto-ghci-libs</option>,
13 <option>-u</option>/<option>--update-package</option>,
14 <option>--force</option>, and
15 <option>-i</option>/<option>--input-file</option>, and
16 suppport for expanding environment variables in package
17 descriptions. See <xref linkend="packages">).</para>
20 <para>The latest version of the FFI spec is fully supported.
21 The syntax of FFI declarations has changed accordingly. The
22 old syntax is still accepted for the time being, but will
23 elicit a warning from the compiler.</para>
26 <para>New option: <option>-F</option> specifies a user-defined
27 preprocessing phase (see <xref linkend="pre-processor">).</para>
30 <para>Major overhaul of the heap profiling subsystem, with new
31 facilities for retainer profiling and biographical profiling
32 (ala nhc98, albeit with a couple of omissions). The syntax of
33 the runtime heap-profiling options has changed. See <xref
34 linkend="prof-heap">.</para>
37 <para>The type system now supports full rank-N types
38 (previously only limited rank-2 types were supported). See
39 <xref linkend="universal-quantification">.</para>
42 <para>Explicit kind annotations can now be given on any
43 binding occurrence of a type variable. See <xref
44 linkend="sec-kinding">.</para>
47 <para>The handling of type synonyms has been rationalised.
48 See <xref linkend="type-synonyms">.</para>
51 <para>Fixes for several space leaks in the compiler itself
52 (these fixes were also merged into 5.02.3).</para>
55 <para>It is now possible to derive arbitrary classes for
56 newtypes. See <xref linkend="newtype-deriving">.</para>
59 <para>Deadlock is now an exception, rather than a return
60 status from the scheduler. See the module
61 <literal>Control.Exception</literal> in the library
62 documentation for more details.</para>
65 <para>The syntax and behaviour of <literal>RULE</literal>
66 pragmas has changed slightly. See <xref
67 linkend="rewrite-rules">.</para>
70 <para>Interface files are now in a binary format to reduce
71 compilation times. To view an interface file in plain text,
72 use the <option>--show-iface</option> flag.</para>
75 <para>A restriction on the form of class declarations has been
76 lifted. In Haskell 98, it is illegal for class method types
77 to mention constraints on the class type variable. eg.</para>
81 elem :: Eq a => a -> s a -> Bool
84 <para>This restriction has now been lifted in GHC.</para>
87 <para>Main threads can now receive the
88 <literal>BlockedOnDeadMVar</literal> exception in the same way
89 as other threads.</para>
92 <para>The <option>-fall-strict</option> flag never really
93 worked, and has been removed.</para>
96 <para>The syntax of <literal>.hi-boot</literal> files is now
97 much clearer and Haskell-like. See <xref
98 linkend="mutual-recursion">.</para>
101 <para>There is a new flag <option>-fffi</option> which enables
102 FFI support without turning on the rest of the GHC
106 <para>The syntax for implicit parameter bindings has changed.
107 Previously the keyword <literal>with</literal> was used to
108 introduce implicit bindings, but now implicit bindings may be
109 introduced using <literal>let</literal> (see <xref
110 linkend="implicit-parameters">). As a result of this,
111 <literal>with</literal> is no longer a keyword when
112 <option>-fglasgow-exts</option> is turned on.</para>
114 <para>The option <literal>-fwith</literal> may be used to
115 restore the old behaviour.</para>
118 <para>Infix type constructors are now allowed, and must begin
119 with a colon (as with data constructors). See <xref
120 linkend="infix-tycons">.</para>
123 <para>The <literal>do</literal>-notation syntax is now
124 rebindable in the same way as other built-in syntax. See
125 <xref linkend="rebindable-syntax">.</para>
128 <para>Support for using “frameworks” on
129 Darwin/MacOS X has been added. See the
130 <option>-framework</option> option in <xref
131 linkend="options-linker">, and the
132 <literal>framework_dirs</literal> field of a package spec in
133 <xref linkend="package-management">.</para>
139 <title>User-visible interpreter (GHCi) changes</title>
142 <para>New commands: <literal>:browse</literal>, <literal>:set
143 args</literal>, <literal>:set prog</literal>, <literal>:show
144 binadings</literal>, and <literal>:show modules</literal> (see
145 <xref linkend="ghci-commands">).</para>
148 <para>There is a much more flexible mechanism for manipulating
149 the scope for expressions typed at the prompt. For example,
150 one can now have both the <literal>Prelude</literal> and the
151 exports of several compiled modules in scope at the same
152 time. See <xref linkend="ghci-scope">.</para>
155 <para>GHCi now supports <literal>foreign import
156 "wrapper"</literal> FFI declarations.</para>
162 <title>User-visible library changes</title>
165 <para>GHC is in the process of moving to a new hierarchical
166 set of libraries. At the moment, we have two sets of
167 libraries, both described in accompanying documents:</para>
170 <para>The “new libraries” which are
171 hierarchical and consist of the following packages:
172 <literal>base</literal>, <literal>haskell98</literal>,
173 <literal>haskell-src</literal>, and
174 <literal>network</literal>. Broadly speaking,
175 <literal>base</literal> contains the
176 <literal>Prelude</literal>, standard libraries and most of
177 the contents of the old <literal>lang</literal>
178 package. By default, the <literal>base</literal> and
179 <literal>haskell98</literal> packages are enabled.</para>
183 <para>The <literal>hslibs</literal>, most of which are now
184 deprecated. Where possible, new code should be written to
185 use the new libraries instead. </para>
187 <para>The following libraries in <literal>hslibs</literal>
188 have not moved yet:</para>
191 <para>The packages <literal>win32</literal>,
192 <literal>xlib</literal>, <literal>graphics</literal>,
193 and <literal>posix</literal>.</para>
196 <para>The Edison libraries in the
197 <literal>data</literal> package.</para>
200 <para>In the <literal>lang</literal> package, the
201 modules <literal>TimeExts</literal>,
202 <literal>DirectoryExts</literal>,
203 <literal>SystemExts</literal>, and
204 <literal>NumExts</literal>.</para>
207 <para>The HaXml libraries in the
208 <literal>text</literal> package.</para>
211 <para>In the <literal>util</literal> package, the
212 modules <literal>MD5</literal>,
213 <literal>Select</literal>, <literal>Memo</literal>,
214 <literal>Observe</literal>, and
215 <literal>Readline</literal>.</para>
219 <para>All other libraries from <literal>hslibs</literal>
220 either have equivalents in the new libraries (see the
221 <literal>hslibs</literal> docs for details), or were
222 already deprecated and hence were not moved into the new
229 <para>The <literal>Read</literal> class is now based on a
230 parsing combinator library which is vastly more efficient than
231 the previous one. See the modules
232 <literal>Text.Read</literal>.
233 <literal>Text.ParserCombinators.ReadP</literal>, and
234 <literal>Text.ParserCombinators.ReadPrec</literal> in the
235 library documentation.</para>
237 <para>The code generated by the compiler for derived
238 <literal>Read</literal> instances should be much shorter than
245 <title>New experimental features</title>
248 <para>Linear implicit parameters. See <xref
249 linkend="linear-implicit-parameters">.</para>
252 <para>The RTS has support for running in a multi-threaded
253 environment and making non-blocking (from Haskell's point of
254 view) calls to foreign C functions which would normally block.
255 To enable this behaviour, configure with the
256 <option>--enable-threaded-rts</option> option.</para>
259 <para>The compiler can now read in files containing Core
260 syntax (such as those produced by the
261 <option>-fext-core</option> option) and compile them. This is
262 enabled with the <option>-fcore</option> flag.</para>
268 <title>Internal changes</title>
271 <para>Happy 1.13 is now required to build GHC, because of the
272 change in names of certain libraries.</para>
280 ;;; Local Variables: ***
282 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***