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