[project @ 1998-11-26 09:17:22 by sof]
[ghc-hetmet.git] / ghc / docs / users_guide / 2-04-notes.vsgml
1 <sect1>Release notes for version~2.04---6/97
2 <label id="release-2-04">
3 <p>
4
5 GHC 2.04 is a minor upgrade of GHC 2.02 (and the bugfix release,
6 2.03), representing work done through May '97. This new release
7 adds the following:
8
9 <itemize>
10 <item>
11 Data constructors can now have polymorphic fields, and ordinary
12 functions can have polymorphic arguments.  Details on
13
14 <tscreen><verb>
15         http://www.cse.ogi.edu/~simonpj/quantification.html
16 </verb></tscreen>
17
18 Existential types coming, but not done yet.
19
20 <item> Pattern guards implemented, see
21         
22 <tscreen><verb>
23 http://www.cse.ogi.edu/~simonpj/guards.html
24 </verb></tscreen>
25
26 <item> Compiler can now compile itself.
27
28 <item> @INLINE@ pragmas honoured (caveat: not yet
29 working on instance-decl methods) 
30
31 <item> Simplifier improvements and better inlining gives
32 better code; not sure how *much* better.
33
34 <item> @-dshow-rn-stats@ print out amusing statistics about what
35 the renamer does.
36
37 <item>
38 When compiling without -O, the renamer (the pass responsible for
39 slurping in interface file and making sure everything is in scope
40 etc.) is now more careful about what it will bring in (especially
41 data constructors and instance declarations). The upshot of this
42 change is that a lot of the (unnecessary) work this pass did in
43 2.02/2.03 is now avoided.
44
45 @-fno-prune-tydecls@ and @-fno-prune-instdecls@ switch off these
46 renamer optimisations. You can try the effect with the renamer
47 statistics. War stories welcome.
48
49 <item>
50     The Heroic Efforts of @Andr\'e Santos <alms@@di.ufpe.br>@ have
51     been included, AIX/RS6000 is now a supported @ghc@
52     platform! Bug reports concerning this port to (as always)
53     @glasgow-haskell-bugs@@dcs.gla.ac.uk@.
54
55 <item>
56     A lot of the bugs that were present in versions 2.02/2.03
57     have been fixed (thanks to everyone that reported bugs!).
58     A list of the reported problems with 2.02/2.03 can be found at
59
60 <tscreen><verb>
61     http://www.dcs.gla.ac.uk/fp/software/ghc/ghc-bugs.html
62 </verb></tscreen>
63
64     No doubt entries for 2.04 will be added here as well :-)
65
66 <item>
67     This release is available in source format only. To build it you'll
68     need to have either a copy of GHC~0.29 or GHC~2.02/3 installed.
69     For people either doing porting work or work on a (supported) 
70     platform for which there is no GHC binary bundles available, the
71     necessary intermediate files are also available (.hc and .hi files).
72
73     Consult the installation guide for more information on how
74     to build or bootstrap. The guide is included in the distribution
75     (in the fptools/docs directory), and an on-line version of the
76     document can be found at
77
78 <tscreen><verb>
79     http://www.dcs.gla.ac.uk/fp/software/ghc/ghc-doc/install-guide.html
80 </verb></tscreen>
81 </itemize>
82
83 In addition to the above, we've made the following minor changes to
84 the GHC libraries/our implementation of the Haskell standard prelude:
85
86 <itemize>
87 <item>
88 @isPrefixOf@ and @isSuffixOf@ has been added to @List@.
89 <item>
90 The empty type @Void@ is now exported from the prelude.
91 <item>
92 @GlaExts@ exports the @Lift@ data type:
93
94 <tscreen><verb>
95 data Lift a = Lift a
96 </verb></tscreen>
97
98 you might need it someday...
99
100 <item>
101 The @Foreign@ interface now also exports the representations
102 for @Word@ and @Addr@.
103
104 <item> The low-level file handle interface in the @POSIX@ system
105 library has been reworked a bit, most notably is the renaming of
106 @Channel@ to @Fd@ and the introduction of operations for converting
107 to and from @Handle@ and @Fd@ values. The changes are:
108
109 <tscreen><verb>
110 --Renamed functions (old name in square brackets)
111 openFd :: FilePath       
112        -> OpenMode 
113        -> Maybe FileMode 
114        -> OpenFileFlags 
115        -> IO Fd
116  -- [openChannel]
117 fdSeek  :: Fd -> SeekMode -> FileOffset -> IO FileOffset 
118  --[seekChannel]
119 fdRead  :: Fd -> ByteCount -> IO (String, ByteCount)     
120  --[readChannel]
121 fdWrite :: Fd -> String -> IO ByteCount                  
122  --[writeChannel]
123 fdClose :: Fd -> IO ()          
124  --[closeChannel]
125 setFdOption :: Fd -> FdOption -> Bool -> IO ()
126  --[setChannelOption]
127 queryFdOption :: Fd -> FdOption -> IO Bool
128  --[queryChannelOption]
129 dup :: Fd -> IO Fd
130  --[dupChannel]
131 dupTo :: Fd -> Fd -> IO ()
132  --[dupChannelTo]
133
134 data FdOption = AppendOnWrite | CloseOnExec | NonBlockingRead
135  --[ChannelOption]
136 getFdStatus :: Fd -> IO FileStatus
137  --[getChannelStatus]
138
139 -- New data structure collecting together misc flags passed to openFd
140 data OpenFileFlags =
141  OpenFileFlags {
142     append    :: Bool,
143     exclusive :: Bool,
144     noctty    :: Bool,
145     nonBlock  :: Bool,
146     trunc     :: Bool
147  }
148
149 --New ops for converting between Fd and Handle:
150 fdToHandle :: Fd -> IO Handle
151 handleToFd :: Handle -> IO Fd
152 intToFd    :: Int -> Fd -- use with care.
153 </verb></tscreen>
154
155 </itemize>