1 <sect1 id="release-5-04">
2 <title>Release notes for version 5.04</title>
5 <title>User-visible compiler changes</title>
8 <para>Full support for MacOS X, including fully optimized compilation, has been added. Only a native
9 code generator and support for <option>-split-objs</option> is still missing.
10 Everything else needs more testing, but should work.</para>
13 <para><literal>ghc-pkg</literal>: new options
14 <option>--auto-ghci-libs</option>,
15 <option>-u</option>/<option>--update-package</option>,
16 <option>--force</option>, and
17 <option>-i</option>/<option>--input-file</option>, and
18 suppport for expanding environment variables in package
19 descriptions. See <xref linkend="packages">).</para>
22 <para>The latest version of the FFI spec is fully supported.
23 The syntax of FFI declarations has changed accordingly. The
24 old syntax is still accepted for the time being, but will
25 elicit a warning from the compiler.</para>
28 <para>New option: <option>-F</option> specifies a user-defined
29 preprocessing phase (see <xref linkend="pre-processor">).</para>
32 <para>Major overhaul of the heap profiling subsystem, with new
33 facilities for retainer profiling and biographical profiling
34 (ala nhc98, albeit with a couple of omissions). The syntax of
35 the runtime heap-profiling options has changed. See <xref
36 linkend="prof-heap">.</para>
39 <para>The type system now supports full rank-N types
40 (previously only limited rank-2 types were supported). See
41 <xref linkend="universal-quantification">.</para>
44 <para>Explicit kind annotations can now be given on any
45 binding occurrence of a type variable. See <xref
46 linkend="sec-kinding">.</para>
49 <para>The handling of type synonyms has been rationalised.
50 See <xref linkend="type-synonyms">.</para>
53 <para>Fixes for several space leaks in the compiler itself
54 (these fixes were also merged into 5.02.3).</para>
57 <para>It is now possible to derive arbitrary classes for
58 newtypes. See <xref linkend="newtype-deriving">.</para>
61 <para>Deadlock is now an exception, rather than a return
62 status from the scheduler. See the module
63 <literal>Control.Exception</literal> in the library
64 documentation for more details.</para>
67 <para>The syntax and behaviour of <literal>RULE</literal>
68 pragmas has changed slightly. See <xref
69 linkend="rewrite-rules">.</para>
72 <para>Interface files are now in a binary format to reduce
73 compilation times. To view an interface file in plain text,
74 use the <option>--show-iface</option> flag.</para>
77 <para>A restriction on the form of class declarations has been
78 lifted. In Haskell 98, it is illegal for class method types
79 to mention constraints on the class type variable. eg.</para>
83 elem :: Eq a => a -> s a -> Bool
86 <para>This restriction has now been lifted in GHC.</para>
89 <para>Main threads can now receive the
90 <literal>BlockedOnDeadMVar</literal> exception in the same way
91 as other threads.</para>
94 <para>The <option>-fall-strict</option> flag never really
95 worked, and has been removed.</para>
98 <para>The syntax of <literal>.hi-boot</literal> files is now
99 much clearer and Haskell-like. See <xref
100 linkend="mutual-recursion">.</para>
103 <para>There is a new flag <option>-fffi</option> which enables
104 FFI support without turning on the rest of the GHC
108 <para>The syntax for implicit parameter bindings has changed.
109 Previously the keyword <literal>with</literal> was used to
110 introduce implicit bindings, but now implicit bindings may be
111 introduced using <literal>let</literal> (see <xref
112 linkend="implicit-parameters">). As a result of this,
113 <literal>with</literal> is no longer a keyword when
114 <option>-fglasgow-exts</option> is turned on.</para>
116 <para>The option <literal>-fwith</literal> may be used to
117 restore the old behaviour.</para>
120 <para>Infix type constructors are now allowed, and must begin
121 with a colon (as with data constructors). See <xref
122 linkend="infix-tycons">.</para>
125 <para>The <literal>do</literal>-notation syntax is now
126 rebindable in the same way as other built-in syntax. See
127 <xref linkend="rebindable-syntax">.</para>
130 <para>Support for using “frameworks” on
131 Darwin/MacOS X has been added. See the
132 <option>-framework</option> option in <xref
133 linkend="options-linker">, and the
134 <literal>framework_dirs</literal> field of a package spec in
135 <xref linkend="package-management">.</para>
141 <title>User-visible interpreter (GHCi) changes</title>
144 <para>New commands: <literal>:browse</literal>, <literal>:set
145 args</literal>, <literal>:set prog</literal>, <literal>:show
146 binadings</literal>, and <literal>:show modules</literal> (see
147 <xref linkend="ghci-commands">).</para>
150 <para>There is a much more flexible mechanism for manipulating
151 the scope for expressions typed at the prompt. For example,
152 one can now have both the <literal>Prelude</literal> and the
153 exports of several compiled modules in scope at the same
154 time. See <xref linkend="ghci-scope">.</para>
157 <para>GHCi now supports <literal>foreign import
158 "wrapper"</literal> FFI declarations.</para>
164 <title>User-visible library changes</title>
167 <para>GHC is in the process of moving to a new hierarchical
168 set of libraries. At the moment, we have two sets of
169 libraries, both described in accompanying documents:</para>
172 <para>The “new libraries” which are
173 hierarchical and consist of the following packages:
174 <literal>base</literal>, <literal>haskell98</literal>,
175 <literal>haskell-src</literal>, and
176 <literal>network</literal>. Broadly speaking,
177 <literal>base</literal> contains the
178 <literal>Prelude</literal>, standard libraries and most of
179 the contents of the old <literal>lang</literal>
180 package. By default, the <literal>base</literal> and
181 <literal>haskell98</literal> packages are enabled.</para>
185 <para>The <literal>hslibs</literal>, most of which are now
186 deprecated. Where possible, new code should be written to
187 use the new libraries instead. </para>
189 <para>The following libraries in <literal>hslibs</literal>
190 have not moved yet:</para>
193 <para>The packages <literal>win32</literal>,
194 <literal>xlib</literal>, <literal>graphics</literal>,
195 and <literal>posix</literal>.</para>
198 <para>The Edison libraries in the
199 <literal>data</literal> package.</para>
202 <para>In the <literal>lang</literal> package, the
203 modules <literal>TimeExts</literal>,
204 <literal>DirectoryExts</literal>,
205 <literal>SystemExts</literal>, and
206 <literal>NumExts</literal>.</para>
209 <para>The HaXml libraries in the
210 <literal>text</literal> package.</para>
213 <para>In the <literal>util</literal> package, the
214 modules <literal>MD5</literal>,
215 <literal>Select</literal>, <literal>Memo</literal>,
216 <literal>Observe</literal>, and
217 <literal>Readline</literal>.</para>
221 <para>All other libraries from <literal>hslibs</literal>
222 either have equivalents in the new libraries (see the
223 <literal>hslibs</literal> docs for details), or were
224 already deprecated and hence were not moved into the new
231 <para>The <literal>Read</literal> class is now based on a
232 parsing combinator library which is vastly more efficient than
233 the previous one. See the modules
234 <literal>Text.Read</literal>.
235 <literal>Text.ParserCombinators.ReadP</literal>, and
236 <literal>Text.ParserCombinators.ReadPrec</literal> in the
237 library documentation.</para>
239 <para>The code generated by the compiler for derived
240 <literal>Read</literal> instances should be much shorter than
247 <title>New experimental features</title>
250 <para>Linear implicit parameters. See <xref
251 linkend="linear-implicit-parameters">.</para>
254 <para>The RTS has support for running in a multi-threaded
255 environment and making non-blocking (from Haskell's point of
256 view) calls to foreign C functions which would normally block.
257 To enable this behaviour, configure with the
258 <option>--enable-threaded-rts</option> option.</para>
261 <para>The compiler can now read in files containing Core
262 syntax (such as those produced by the
263 <option>-fext-core</option> option) and compile them. This is
264 enabled with the <option>-fcore</option> flag.</para>
270 <title>Internal changes</title>
273 <para>Happy 1.13 is now required to build GHC, because of the
274 change in names of certain libraries.</para>
282 ;;; Local Variables: ***
284 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter" "sect1") ***