[project @ 1997-03-24 04:42:42 by sof]
[ghc-hetmet.git] / ghc / docs / users_guide / 2-02-notes.lit
1 Release~2.02 is the first release of Glasgow Haskell for Haskell~1.4.
2
3 The announcement for this release is distributed as \tr{ANNOUNCE-2.02}
4 in the top-level directory.  It contains very important caveats about
5 2.02, which we do not repeat here!
6
7 Information about ``what's ported to which machine'' is in the
8 Installation Guide.  Since 2.01, we've added support for Win32
9 (Windows NT and Windows 95).
10
11 %************************************************************************
12 %*                                                                      *
13 \subsection[2-02-config]{New configuration things in 2.02}
14 %*                                                                      *
15 %************************************************************************
16
17 %************************************************************************
18 %*                                                                      *
19 \subsection[2-02-user-visible]{User-visible changes in 2.02, including incompatibilities}
20 %*                                                                      *
21 %************************************************************************
22
23 GHC~2.02 is a compiler for Haskell~1.4 and, as such, introduces a
24 bunch of user-visible changes.  The GHC user's guide has a section to
25 help you upgrade your programs to Haskell~1.4 from 1.2; all
26 user-visible changes are described there (and not repeated here).
27
28 %************************************************************************
29 %*                                                                      *
30 \subsection[2-02-options]{New or changed GHC command-line options}
31 %*                                                                      *
32 %************************************************************************
33
34 \begin{itemize}
35 \item GHC now warns of possibly-incomplete patterns in case expressions
36 and function bindings.  You can suppress these warnings with @-fno-warn-incomplete-patterns@.
37
38 GHC also warns of completely overlapped patterns.  You can't switch this off.
39
40 \item GHC can warn of shadowed names, though it does not do so by default.  
41 Just occasionally this shows up 
42 an otherwise hard-to-find bug.  To warn of shadowed names use @-fwarn-name-shadowing@
43
44 \item You can now generate `make' dependencies via the compiler
45 driver, use the option @-M@ together with the list source files to compute
46 the dependencies for. By default, the dependencies will be appended to
47 the file \tr{Makefile} in the current directory.
48
49 \item For hackers, the flag @-dshow-rn-trace@ shows what the renamer is up to.
50 Sit back and marvel.
51
52 \end{itemize}
53
54
55 %************************************************************************
56 %*                                                                      *
57 \subsection[2-02-new-in-compiler]{New in the compiler proper}
58 %*                                                                      *
59 %************************************************************************
60
61 \begin{itemize}
62 \item
63 Completely new ``make-world'' system, properly documented (at last) in the
64 installation guide.  No Jmakefiles; but you *need* Gnu make
65 (gmake). The more recent the better (v 3.70+).
66
67 \item
68 The ``renamer''---the part of the compiler that implements
69 the Haskell module system---has been completely rewritten, again.
70
71 The format of interface files has changed significantly.  Interface files
72 generated by 2.01 will not work with 2.02.
73
74 \item
75 Even less special pleading for the Prelude than in 2.01.  If you wanted
76 to write your own Prelude and drop it in, you would have
77 a really good chance now.
78 \end{itemize}
79
80
81 %************************************************************************
82 %*                                                                      *
83 \subsection[2-02-new-in-libraries]{In the libraries}
84 %*                                                                      *
85 %************************************************************************
86
87 The libraries have been completely reorganised.  There's a description in
88 \sectionref{syslibs}.
89
90
91 %************************************************************************
92 %*                                                                      *
93 \subsection[2-02-new-in-syslibs]{In ``hslibs'' libraries}
94 %*                                                                      *
95 %************************************************************************
96
97
98 %************************************************************************
99 %*                                                                      *
100 \subsection[2-02-new-in-rts]{In the runtime system}
101 %*                                                                      *
102 %************************************************************************
103
104 \begin{itemize}
105 \item @ForeignObjs@ are properly deallocated when execution halts, as well
106 as when the garbage collector spots the @ForeignObj@ as being unreferenced.
107 This is important if you are using a @ForeignObj@ to refer to
108 a @COM@ object or other remote resource. You want that resource to be relased
109 when the program terminates.
110
111 \item Files handles in the IO prelude are implemented using
112 @ForeignObjs@, and closed when the file handle is unreferenced.  This
113 means that if you open zillions of files then just letting go of the
114 file handle is enough to close it. 
115 \end{itemize}
116
117 %************************************************************************
118 %*                                                                      *
119 \subsection[2-02-new-elsewhere]{Other new stuff}
120 %*                                                                      *
121 %************************************************************************
122
123 2.02 is released together with Green Card, a foreign-language
124 interface generator for Haskell. More details elsewhere...
125
126
127 %************************************************************************
128 %*                                                                      *
129 \subsection[2-02-troublespots]{Known troublespots}
130 %*                                                                      *
131 %************************************************************************
132
133 The 2.02 compiler has the following known deficiencies:
134
135 \begin{description}
136 \item[native code generator, x86:]
137
138 The native code generator for x86 platforms is by default switched
139 off, as the code the compiler produces with it enabled was discovered
140 just before releaseing to be wonky. Rather than delay the release
141 further, GHC on x86 platforms rely on \tr{GCC} as their
142 backend for now. Hopefully fixed soon.
143
144 \item[Simplifier looping:]
145
146 The simplifier(Glasgow-speak for optimiser) has been observed to get
147 into a loop in one or two cases. If you should observe this, please
148 report it as a bug - the work around is to turn off optimisation.
149
150 \item[Undefined @*_vap_info@ symbols:]
151
152 If the linker complains about some undefined @*_vap_info@ symbols when
153 linking 2.02 compiled programs (very unlikely) - fix this by compiling
154 the module where the references are coming from with
155 @-fno-lambda-lifting@.
156
157 \end{description}