[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / docs / release_notes / 0-16-notes.lit
1 Release~0.16 was the second public release of this compilation system.
2 It was primarily a bug-fixing and ``solidifying'' release.
3
4 The announcement for this release is distributed as \tr{ANNOUNCE-0.16}
5 in the top-level directory.
6
7 %************************************************************************
8 %*                                                                      *
9 \subsection[0-16-new-docs]{New documentation}
10 %*                                                                      *
11 %************************************************************************
12
13 We're providing a few more papers, in \tr{ghc/docs/papers}.  See
14 \tr{ghc/docs/README} for a full list of documentation.
15
16 %************************************************************************
17 %*                                                                      *
18 \subsection[0-16-new-in-compiler]{New in the compiler proper}
19 %*                                                                      *
20 %************************************************************************
21
22 New strictness analyser and update analyser; their use will be
23 reflected in the pragmas in your interface files.  The format of these
24 interface pragmas {\em will probably change}.
25
26 Errors related to misuse of Prelude identifiers are more likely to be
27 caught.
28
29 For some unknown reason, our ``wired-in'' default declaration in 0.10 was
30 \tr{default (Integer,Double)}.  We changed it to
31 \tr{default (Int,Double)}, as the Report suggests (which is less safe).
32
33 We've switched from basing our derived instances on a non-standard
34 @cmp3@ method (class @Ord@), to basing them on another non-standard
35 method @tagCmp@.  The relevant types and things are...
36 \begin{verbatim}
37 cmp3 :: b -> b -> b -> a -> a -> b
38
39 tagCmp :: a -> a -> CMP_TAG
40 data CMP_TAG = LT_TAG | EQ_TAG | GT_TAG
41 \end{verbatim}
42 If you peer into the \tr{ghc/lib/prelude/*.hs} code, it will be
43 obvious what's going on here.  We hope to make further improvements
44 on comparison code in the foreseeable future.
45
46 %************************************************************************
47 %*                                                                      *
48 \subsection[0-16-new-in-libraries]{In the prelude and runtime support}
49 %*                                                                      *
50 %************************************************************************
51
52 The libraries underpinning Glasgow monadic I/O, sequencing, primitive
53 arrays, and variables have been reworked, with some consequent
54 changes.  If you encounter difficulties, you should consult the
55 @PreludeGlaIO.hi@ and @PreludeGlaArray.hi@ interfaces in your
56 \tr{imports} directory.
57
58 Andy Gill's proposal for access to standard Haskell I/O functions from
59 the monadic I/O world has been implemented.  So you have functions
60 such as @getArgsIO@, @appendChanIO@, etc., etc.
61
62 The stuff you used to get from @Stdio.hi@ now comes directly from
63 @PreludeGlaIO.hi@.
64
65 The @packString#@ function has been moved into a module of its own,
66 @PackedString@, and {\em its type has changed}.  The functions now in
67 that module are (to be elaborated...):
68 \begin{verbatim}
69 packString  :: String -> PackedString
70 packString# :: String -> Arr# Char#
71 \end{verbatim}
72 The latter is very useful to preparing @String@ arguments to pass to C.
73
74 The HBC library modules that compile readily with GHC are available,
75 you'll need to give a \tr{-lHShbc} option to the driver.  These
76 modules are:
77 \begin{verbatim}
78 Either, Hash, ListUtil, Maybe, Miranda, Number, Parse, Pretty, QSort,
79 Random, Time, Word
80 \end{verbatim}
81
82 The GNU multi-precision (GMP) package which underpins our @Integer@
83 support has been upgraded to version 1.3.2.
84
85 %************************************************************************
86 %*                                                                      *
87 \subsection[0-16-new-elsewhere]{New elsewhere}
88 %*                                                                      *
89 %************************************************************************
90
91 0.16 has a new and much uglier ``assembler mangler''
92 (\tr{ghc/driver/ghc-asm-*.lprl}), which is what converts GCC-produced
93 assembly-language output into the stuff you actually run.  Besides
94 throwing away function prologues/epilogues, it parks ``info tables''
95 next to entry code, and fast-entry code right next to slow-entry code.
96
97 The net effect of this assembler-mangler is that there is {\em very
98 little runtime penalty} for compiling via GCC.
99
100 The way we go about mapping ``STG registers'' to real machine
101 registers (\tr{ghc/imports/StgRegs.lh}) is different.  It should be
102 particularly better for machines with few registers (though we still
103 don't have a good solution for x86 machines).
104
105 We can now ``steal'' caller-save registers; in the past, we could only
106 steal callee-save registers.