[project @ 1996-07-25 20:43:49 by partain]
[ghc-hetmet.git] / ghc / docs / release_notes / 2-01-notes.lit
1 Release~2.01 is the first release of Glasgow Haskell for Haskell~1.3.
2 It represents a major step forward in GHC development since GHC~0.26
3 (July 1995).  Note that we are also releasing GHC~0.29, the current
4 state-of-play with the Haskell~1.2 compiler---at the same time as
5 2.01.
6
7 The announcement for this release is distributed as \tr{ANNOUNCE-2.01}
8 in the top-level directory.  It contains very important caveats about
9 2.01, which we do not repeat here!
10
11 Information about ``what's ported to which machine'' is in the
12 Installation Guide.  Since 0.26, we've improved our support for iX86
13 (Intel) boxes, notably those running Linux.
14
15 %************************************************************************
16 %*                                                                      *
17 \subsection[2-01-config]{New configuration things in 2.01}
18 %*                                                                      *
19 %************************************************************************
20
21 %************************************************************************
22 %*                                                                      *
23 \subsection[2-01-user-visible]{User-visible changes in 2.01, including incompatibilities}
24 %*                                                                      *
25 %************************************************************************
26
27 GHC~2.01 is a compiler for Haskell~1.3 and, as such, introduces many
28 user-visible changes.  The GHC user's guide has a section to help you
29 upgrade your programs to Haskell~1.3; all user-visible changes
30 are described there (and not repeated here).
31
32 %************************************************************************
33 %*                                                                      *
34 \subsection[2-01-options]{New or changed GHC command-line options}
35 %*                                                                      *
36 %************************************************************************
37
38 A new flag, \tr{-recomp} invokes the new ``recompilation checker.''
39 We recommend that you use it whenever you use `make' to build your
40 Haskell programs.  Please see the User's Guide for details.
41
42 The flags \tr{-fomit-derived-read} and
43 \tr{-fomit-reexported-instances} have died; there is no longer any
44 need for them.
45
46 %************************************************************************
47 %*                                                                      *
48 \subsection[2-01-new-in-compiler]{New in the compiler proper}
49 %*                                                                      *
50 %************************************************************************
51
52 Substantially rewritten.  Notable points:
53 \begin{itemize}
54 \item
55 The typechecker, besides doing all the new 1.3
56 features (constructor classes, records, etc.), has been made
57 ready to do linear types (e.g., there are now ``usage
58 variables'' as well as ``type variables'').
59
60 \item
61 The Core language now has one constructor for lambdas
62 (\tr{Lam}; rather than two, \tr{CoLam} and \tr{CoTyLam});
63 also, one constructor for applications (\tr{App}, rather
64 than two, \tr{CoApp} and \tr{CoTyApp}).
65
66 Consequently, new more-general datatypes for binders and
67 arguments now exist (\tr{CoreBinder} and \tr{CoreArg},
68 respectively).
69
70 Again, the Core language is now ``linear types''-ready
71 (though the work hasn't been done yet).
72
73 A new Core constructor, \tr{Coerce}, exists to support the
74 1.3 \tr{newtype} construct.
75
76 \item
77 The ``renamer''---the part of the compiler that implements
78 the Haskell module system---has been completely rewritten.
79
80 In part, this is because the 1.3 module system is radically
81 changed from 1.2, even if the user is unlikely to notice.
82
83 We've implemented the new system with a ``go to the
84 horse's mouth'' scheme; that is, to discover the facts about
85 an entity \tr{Foo.bar}, we {\em always} go to the interface
86 for module \tr{Foo}; hence, we can never get duff information
87 about \tr{bar} from some intermediary.
88
89 Interface files are no longer mandated by the language, so
90 they are completely different in 2.01 compared to 0.2x.  They
91 will very likely change again.  All processing of interface
92 files is done in Haskell now (the most likely reason why GHC
93 has slowed down :-().
94
95 \item
96 Much less special pleading for the Prelude.  If you wanted
97 to write your own Prelude and drop it in, you would have
98 a fighting chance now.
99
100 \item
101 No more `make' dependency loops!  (Hooray!) The whole compiler
102 will build in one `make' run, no fuss or bother.
103 \end{itemize}
104
105 %************************************************************************
106 %*                                                                      *
107 \subsection[2-01-new-in-libraries]{In the ``required'' libraries (incl. Prelude)}
108 %*                                                                      *
109 %************************************************************************
110
111 We support standard 1.3 monadic I/O, to the best of our knowledge.
112
113 The proposal for \tr{LibPosix} didn't make it into Haskell 1.3 I/O.
114 So it's now a system library, \tr{-syslib posix}.  (And, of course,
115 the \tr{Lib} prefix is gone.)
116
117 %************************************************************************
118 %*                                                                      *
119 \subsection[2-01-new-in-glaexts]{New in ``Glasgow extensions'' library things}
120 %*                                                                      *
121 %************************************************************************
122
123 The @PreludeGlaMisc@ and @PreludePrimIO@ interfaces have died.
124 Use @PreludeGlaST@ instead.
125
126 We don't really know what our interfaces-to-nonstandard-things will
127 eventually look like...
128
129 MallocPtrs now called ForeignObjs
130
131 The @_PackedString@ gunk (with leading underscores) is gone.  Just
132 \tr{import PackedString} and use ``normal'' names.
133
134 All of the following are {\em gone}:
135 \begin{verbatim}
136 data _FILE  -- corresponds to a "FILE *" in C
137
138 fclose  :: _FILE -> PrimIO Int
139 fdopen  :: Int -> String -> PrimIO _FILE
140 fflush  :: _FILE -> PrimIO Int
141 fopen   :: String -> String -> PrimIO _FILE
142 fread   :: Int -> Int -> _FILE -> PrimIO (Int, _ByteArray Int)
143 freopen :: String -> String -> _FILE -> PrimIO _FILE
144 fwrite  :: _ByteArray Int -> Int -> Int -> _FILE -> PrimIO Int
145
146 appendChanPrimIO :: String -> String -> PrimIO ()
147 appendFilePrimIO :: String -> String -> PrimIO ()
148 getArgsPrimIO    :: PrimIO [String]
149 readChanPrimIO   :: String -> PrimIO String
150 \end{verbatim}
151
152 %************************************************************************
153 %*                                                                      *
154 \subsection[2-01-new-in-syslibs]{In the ``system'' libraries}
155 %*                                                                      *
156 %************************************************************************
157
158 The ``system'' libraries are no longer part of GHC (they lived in
159 \tr{ghc/lib/}); they have been lifted out into a subsystem in their
160 own right (they live in \tr{hslibs}).
161
162 Of course, a GHC distribution will ``happen'' to have these libraries
163 included; however, we hope the libraries will evolve into a large,
164 flourishing, independently-maintained, and independently-distributed
165 body of code---preferably compiler-independent, too!
166
167 Renamings in the GHC system library (\tr{hslibs/ghc/}): The function
168 \tr{BitSet.singletonBS} is now called \tr{unitBS}.  Similarly,
169 \tr{FiniteMap.singletonFM} is now \tr{unitFM}.  \tr{Set.singletonSet}
170 lingers briefly; \tr{unitSet} is also available now.
171
172 We are {\em not} up-to-date with the HBC-for-1.3's HBC library (the source
173 hasn't been released yet).
174
175 The \tr{Either}, \tr{Maybe}, and \tr{Option} modules in the HBC
176 library (\tr{hslibs/hbc/}) have been deleted---they are too close to
177 what Haskell~1.3 provides anyway (hence, confusing).
178
179 The POSIX support code is in \tr{hslibs/posix}.
180
181 We have added a ``contrib'' system library (\tr{hslibs/contrib/});
182 made up of code that was contributed to the ``Haskell library'',
183 mostly by Stephen Bevan.  Quite of bit of code for numerical methods
184 in there...
185
186 %************************************************************************
187 %*                                                                      *
188 \subsection[2-01-new-in-rts]{In the runtime system}
189 %*                                                                      *
190 %************************************************************************
191
192 We have made a point {\em not} to beat on the runtime system very much.
193 Some bugs have been fixed since 0.26, of course.
194
195 The GranSim (parallel-machine simulator) stuff is substantially improved
196 (but you're better off using the 0.29 version of it).
197
198 %************************************************************************
199 %*                                                                      *
200 %\subsection[2-01-new-elsewhere]{Other new stuff}
201 %*                                                                      *
202 %************************************************************************