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
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!
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.
15 %************************************************************************
17 \subsection[2-01-config]{New configuration things in 2.01}
19 %************************************************************************
21 %************************************************************************
23 \subsection[2-01-user-visible]{User-visible changes in 2.01, including incompatibilities}
25 %************************************************************************
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).
32 %************************************************************************
34 \subsection[2-01-options]{New or changed GHC command-line options}
36 %************************************************************************
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.
42 The flags \tr{-fomit-derived-read} and
43 \tr{-fomit-reexported-instances} have died; there is no longer any
46 %************************************************************************
48 \subsection[2-01-new-in-compiler]{New in the compiler proper}
50 %************************************************************************
52 Substantially rewritten. Notable points:
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'').
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}).
66 Consequently, new more-general datatypes for binders and
67 arguments now exist (\tr{CoreBinder} and \tr{CoreArg},
70 Again, the Core language is now ``linear types''-ready
71 (though the work hasn't been done yet).
73 A new Core constructor, \tr{Coerce}, exists to support the
74 1.3 \tr{newtype} construct.
77 The ``renamer''---the part of the compiler that implements
78 the Haskell module system---has been completely rewritten.
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.
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.
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
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.
101 No more `make' dependency loops! (Hooray!) The whole compiler
102 will build in one `make' run, no fuss or bother.
105 %************************************************************************
107 \subsection[2-01-new-in-libraries]{In the ``required'' libraries (incl. Prelude)}
109 %************************************************************************
111 We support standard 1.3 monadic I/O, to the best of our knowledge.
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.)
117 %************************************************************************
119 \subsection[2-01-new-in-glaexts]{New in ``Glasgow extensions'' library things}
121 %************************************************************************
123 The @PreludeGlaMisc@ and @PreludePrimIO@ interfaces have died.
124 Use @PreludeGlaST@ instead.
126 We don't really know what our interfaces-to-nonstandard-things will
127 eventually look like...
129 MallocPtrs now called ForeignObjs
131 The @_PackedString@ gunk (with leading underscores) is gone. Just
132 \tr{import PackedString} and use ``normal'' names.
134 All of the following are {\em gone}:
136 data _FILE -- corresponds to a "FILE *" in C
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
146 appendChanPrimIO :: String -> String -> PrimIO ()
147 appendFilePrimIO :: String -> String -> PrimIO ()
148 getArgsPrimIO :: PrimIO [String]
149 readChanPrimIO :: String -> PrimIO String
152 %************************************************************************
154 \subsection[2-01-new-in-syslibs]{In the ``system'' libraries}
156 %************************************************************************
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}).
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!
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.
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).
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).
179 The POSIX support code is in \tr{hslibs/posix}.
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
186 %************************************************************************
188 \subsection[2-01-new-in-rts]{In the runtime system}
190 %************************************************************************
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.
195 The GranSim (parallel-machine simulator) stuff is substantially improved
196 (but you're better off using the 0.29 version of it).
198 %************************************************************************
200 %\subsection[2-01-new-elsewhere]{Other new stuff}
202 %************************************************************************