[project @ 1996-07-19 18:36:04 by partain]
[ghc-hetmet.git] / ghc / docs / release_notes / 0-23-notes.lit
1 Release~0.23 is the fifth public release of Glasgow Haskell.
2 It incorporates our new work for the second half of 1994.
3
4 The announcement for this release is distributed as \tr{ANNOUNCE-0.23}
5 in the top-level directory.
6
7 %************************************************************************
8 %*                                                                      *
9 \subsection[0-23-ports]{What machines GHC~0.23 runs on}
10 %*                                                                      *
11 %************************************************************************
12
13 NOTE: the porting situation is essentially unchanged between 0.22 and
14 0.23, except for adding the native-code generator for DEC Alphas.
15
16 We use Sun4s running SunOS~4.1.3 and DEC~Alphas running OSF/1~V2.0, so
17 those are the ``fully-supported'' platforms, unsurprisingly.  Both
18 have native-code generators, for quicker compilations.
19
20 The GHC hierarchy of Porting Goodness: (a)~Best is a native-code
21 generator; (b)~next best is a ``registerised''
22 port; (c)~the bare minimum is an ``unregisterised'' port.
23 ``Unregisterised'' Haskell programs are much bigger and slower,
24 but the port is much easier to get going.
25
26 Here's everything that's known about GHC ports, as of 0.23:
27 \begin{description}
28 %-------------------------------------------------------------------
29 \item[Sun4 running SunOS~4.1.3 (\tr{sparc-sun-sunos4}):]
30 Fully supported, including native-code generator.
31
32 %-------------------------------------------------------------------
33 \item[Sun4 running Solaris 2.x (\tr{sparc-sun-solaris2}):]
34 Fully supported, including native-code generator.
35 (NB: not tested before release.)
36
37 %-------------------------------------------------------------------
38 \item[DEC Alpha running OSF/1 V2.0 (\tr{alpha-dec-osf1}):]
39 Fully supported, including native-code generator.
40
41 %-------------------------------------------------------------------
42 \item[Sun3 running SunOS~4.1.3 (\tr{m68k-sun-sunos4}):]
43 GHC~0.23 works registerised.  No native-code generator.
44
45 %-------------------------------------------------------------------
46 \item[HP-PA box running HP/UX 9.x:]
47 An unregisterised port of 0.21 (last ``internal'' release before 0.23)
48 seems to work, except that floating-point is definitely busted.
49 0.23~should be the same.
50
51 %-------------------------------------------------------------------
52 \item[Silicon Graphics box running IRIX 5.x:]
53 An unregisterised port of 0.21
54 seemed to work.  0.23~should be the same.
55
56 %-------------------------------------------------------------------
57 \item[DECstation (MIPS-based):]
58 An unregisterised port back around the time of 0.17 seemed to work;
59 0.23~should be the same, modulo a little bit-rot.
60
61 %-------------------------------------------------------------------
62 \item[x86 PCs running Linux/NetBSD/FreeBSD:]
63 This really needs a native-code generator to be viable.  No
64 recent progress.
65
66 %-------------------------------------------------------------------
67 \item[GRIP multiprocessor:]
68 GRIP is a 68020-based multiprocessor for running parallel Haskell
69 programs; too bad we have the only machine!  We run GHC~0.16 on it,
70 with no plans to upgrade.
71
72 We are working on other parallel stuff.  Stay tuned.
73
74 %-------------------------------------------------------------------
75 \item[NeXT box running whatever NeXTs run:]
76 Carsten Schultz succeeded with a ``registerised'' port of GHC~0.19.
77 There's probably a little bit-rot since then, but otherwise it should
78 still be fine.  Had a report that things were basically OK at 0.22.
79
80 %-------------------------------------------------------------------
81 \item[Macintosh, using MPW:]
82 As mind-blowing at it may seem, David Wright in Tasmania has actually
83 gotten GHC to run on a Macintosh.  Ditto James Thomson here at Glasgow.
84 You may be able to get Thomson's from here.  (Not sure that it will
85 excite you to death, but...)
86 \end{description}
87
88 %************************************************************************
89 %*                                                                      *
90 \subsection[0-23-config]{New configuration things in 0.23}
91 %*                                                                      *
92 %************************************************************************
93
94 Essentially, upgraded to Autoconf~2.  Probably the easiest way to see
95 what all the options are now is to type \tr{./configure --help} and
96 look at the stuff near the end.
97
98 %************************************************************************
99 %*                                                                      *
100 \subsection[0-23-user-visible]{User-visible changes in 0.23, including incompatibilities}
101 %*                                                                      *
102 %************************************************************************
103
104 You'll need to recompile everything if you're switching from a
105 previous version of GHC.  (If you don't, you'll get ``consistency
106 errors''.)  Some day, we will stop doing this to you :-)
107
108 Monadic I/O has taken yet another shake-up; that is outlined in the
109 next section.
110
111 To use the 1.3-DRAFT I/O features, you use a \tr{-fhaskell-1.3} flag.
112 This also nets you, from your Prelude, the \tr{Maybe} and \tr{Either}
113 types, and the functions \tr{thenMaybe}, \tr{curry}, and \tr{uncurry}.
114
115 The driver supports a heap-and-stack-sizes scaling flag.  For example,
116 \tr{-Rscale-sizes2} would cause the driver to use twice as much
117 heap/stack space as it would otherwise.  This is a convenient way to
118 move between machines with differing memory setups (e.g., 32-bit vs
119 64-bit) without changing millions of -H flags in a Makefile.  Note:
120 something like \tr{-Rscale-sizes1.5} is OK, too.
121
122 ``Lit-lit'' literals are now overloaded.  They can be any
123 \tr{_CCallable} type, not just \tr{_Addrs}.  The price of this extra
124 convenience is that you sometimes have to insert a type signature.
125
126 The shift-right primitive-operation, \tr{shiftR#}, has been renamed
127 and clarified to \tr{shiftRA#} (arithmetic).  A new prim-op
128 \tr{shiftRL#} (logical) has been added.
129
130 Comparable shift primitive-ops on \tr{Int#s} (rather than \tr{Word#s})
131 have been added: \tr{iShiftL#}, \tr{iShiftRA#}, and \tr{iShiftRL#}.
132 Long live high-level languages!
133
134 %************************************************************************
135 %*                                                                      *
136 \subsection[0-23-io]{New in I/O, esp. ``monadic,'' esp. ``1.3''}
137 %*                                                                      *
138 %************************************************************************
139
140 GHC~0.23 is still a Haskell~1.2 compiler.  Do nothing weird, and it
141 should work exactly as before.
142
143 If you give GHC a \tr{-fhaskell-1.3} flag (both compile and link time,
144 please!), it will use a VERY EARLY, LARGELY UNTESTED implementation of
145 the DRAFT 1.3 I/O PROPOSAL.
146
147 The \tr{PreludeGlaIO} interface, which was based on a long-ago 1.3 I/O
148 proposal, is DEAD.  It was in a pretty bad state, anyway.
149 Putting \tr{PreludeGlaIO} code through as 1.3 code, I got pretty
150 far with just these few impedance-matching definitions:
151 \begin{verbatim}
152 > type Void = ()
153 > returnIO = return
154 > thenIO = (>>=)
155 > mapIO  :: (a -> IO b) -> [a] -> IO [b]
156 > mapIO f =  accumulate {-was:listIO-} . map f
157 \end{verbatim}
158
159 We supply the DRAFT 1.3 I/O PROPOSAL in \tr{ghc/docs/io-1.3/}.
160 It is in HTML format.
161
162 We still give access to our underlying \tr{PrimIO} monad, via the
163 \tr{PreludePrimIO} interface.  This is the level at which \tr{_ccall_s}
164 operate.  It should still be quite solid, and counts as a good fall-back
165 position when the 1.3-DRAFT stuff dies on you.  See the User's Guide.
166
167 %************************************************************************
168 %*                                                                      *
169 \subsection[0-23-support]{New in support tools (e.g., profiling)}
170 %*                                                                      *
171 %************************************************************************
172
173 The reports from profiling should be a bit tidier.  The ``automagic''
174 cost-centres for, e.g., ``all the CAFs in module X'', will now be
175 reported against \tr{CAFs_in_... X}.  Which seems fair enough.
176
177 GHCI---an INTERPRETER for Glasgow Haskell!  The brainchild and work of
178 Alastair Reid, before he defected to the Enemy at Yale.  Accepts full
179 Glasgow Haskell, including many extensions.  Can mix interpreted and
180 compiled code, the Prelude being a notably case of the latter.
181 MASSIVE HACK VALUE!  The problem is it doesn't quite compile under
182 0.23 (I ran out of time), and some of its dodgy bits (used to mix
183 interpreted and compiled code) need upgrading to work with the new
184 info tables.  It lives in \tr{ghc/compiler} and below, notably the
185 \tr{interpreter} subdirectory.  Don't be shy now---roll up your
186 sleeves and strut your hacking stuff!
187
188 %************************************************************************
189 %*                                                                      *
190 \subsection[0-23-new-in-compiler]{New in the compiler proper}
191 %*                                                                      *
192 %************************************************************************
193
194 The compiler is quite a bit faster at compiling, {\em without}
195 \tr{-O}.  We are in the HBC league now.  I don't remember all the
196 HACKs that we threw in to make this happen :-)
197
198 New-format ``info tables'' (work by Bryan O'Sullivan and friends).
199 Essentially, static info used by the garbage-collector has been moved
200 one indirection further away, into a ``rep table,'' of which there are
201 a fixed number.  So the same GC info isn't replicated over and over
202 again.  This is our main space-savings gain in 0.23.
203
204 A native-code generator for the DEC Alpha.  Jim Mattson did it in one
205 weekend.  What a great system!
206
207 Rather than have a separate Yacc-parser process that spews a long
208 ``prefix form'' string into the compiler, the compiler now just does a
209 \tr{_ccall_ yyparse} and then walks the resulting parse tree directly.
210 (Not quite {\em that} simple, but... still pretty cool.)
211
212 A {\em selective} lambda-lifter.  (Simon is very excited about its
213 selectiveness.)  That means it only does lambda-lifting if there is a
214 benefit in doing so.  It's done on the STG syntax (quite late in the
215 compilation).
216
217 %************************************************************************
218 %*                                                                      *
219 \subsection[0-23-new-in-libraries]{In the prelude and runtime support}
220 %*                                                                      *
221 %************************************************************************
222
223 PackedStrings (now called \tr{_PackedString}s) are now a built-in
224 type, just like \tr{Int}s, say.  Their interface is described with the
225 Glasgow extensions in the User's Guide.  There is also a
226 ``extensions-free'' interface (no underscores on the front of names)
227 which you can get at as a system library (\tr{-syslib ghc}).
228
229 The pretty-printing code that we use in GHC is now available in the
230 GHC system library (\tr{-syslib ghc} and \tr{import Pretty}).  We
231 would claim it is more ``industrial strength'' than the one in the HBC
232 system library...
233
234 Because of name-grabbing by the DRAFT-1.3-I/O, two functions in the
235 HBC library's \tr{Parse} module have been renamed: \tr{(>>)} is now
236 \tr{act}, and \tr{fail} is now \tr{failP}.  (We will change these
237 again if Lennart does something differently.)
238
239 %************************************************************************
240 %*                                                                      *
241 \subsection[0-23-new-elsewhere]{Other new stuff}
242 %*                                                                      *
243 %************************************************************************
244
245 We've added a new utility, \tr{pphs}, for pretty-printing Haskell code
246 in LaTeX documents.  It was written by Andrew Preece, a student at
247 Glasgow.  The code is in \tr{ghc/CONTRIB/pphs}.
248
249 Over in literate-land, we've hidden a copy of a slightly-tweaked
250 \tr{texi2html} script (in \tr{literate/texi2html/texi2html}).  This is
251 probably the most painless way to turn ``literate'' things into
252 Webbable HTML documents.  (Use our literate stuff to make Texinfo
253 files, then convert with \tr{texi2html}.)  NB: not really tested.