[project @ 1998-11-26 09:17:22 by sof]
[ghc-hetmet.git] / ghc / docs / users_guide / 3-01-notes.vsgml
1 <sect1>Release notes for version~3-01---2/98
2 <label id="release-3-01">
3 <p>
4
5 Changes made since 3.00:
6
7 <itemize>
8
9 <item> Fix interaction of "hiding" on import with "module M" on export.
10
11 <item> Fix some floating point conversion problems in @floatExtreme.lc@.
12
13 <item> New Hugs/GHC interface <tt/NumExts/ added and documented.
14
15 <item> moved @showOct@ and @showHex@ from @Numeric@ to @NumExts@.
16
17 <item> imported HBC's quick-sort algorithm from @QSort@ into @List@.
18
19 <item> added support for assertions. Conceptually, a new function has
20        been added to the Prelude with the following type: 
21
22        <tscreen> <verb>
23           assert :: Bool -> a -> a
24        </verb> </tscreen>
25
26        which has the following behaviour:
27  
28        <tscreen> <verb>
29           assert pred v 
30              | pred      = v
31              | otherwise = error "assertion failed"
32        </verb> </tscreen>
33        
34        However in this form, the practical use of assertions is
35        limited as no indication is given as to what assertion failed.
36        So to help out here, ghc will rewrite any uses of <tt/assert/
37        to instead invoke the function <tt/assert__/ :
38  
39        <tscreen> <verb>
40          assert__ :: String -> Bool -> a -> a
41        </verb> </tscreen>
42          
43        where the first argument to <tt/assert__/ is a compiler generated string 
44        which encodes the source location of the original <tt/assert/.
45
46        Assertions are a Glasgow extension, so -fglasgow-exts is
47        needed to use them.
48
49 <item>
50   Split @-fwarn-unused-names@ into
51   
52   <descrip>
53   <tag>@-fwarn-unused-imports@</tag>
54          Warn about unused explicit imports. (in -W)
55   <tag>@-fwarn-unused-binds@</tag>
56          Warn about unused bindings          (in -W)
57   <tag>@-fwarn-unused-matches@</tag>
58          Warn about unused names in pattern matches
59                  (not as useful, relegated to -Wall)
60   </descrip>
61
62 <item> The driver is now always installed as @ghc-<version>@ with a
63 link to it from @ghc@.
64
65 <item> Library re-organisation: all libraries now live under ghc/lib,
66 which has the following structure:
67
68 <tscreen> <verb>
69         ghc/lib/std             --  all prelude files           (libHS.a)
70         ghc/lib/std/cbits
71
72         ghc/lib/exts            -- standard Hugs/GHC extensions (libHSexts.a)
73                                 -- available with '-fglasgow-exts'
74
75         ghc/lib/posix           -- POSIX library                (libHSposix.a)
76         ghc/lib/posix/cbits     -- available with '-syslib posix'
77
78         ghc/lib/misc            -- used to be hslibs/ghc        (libHSmisc.a)
79         ghc/lib/misc/cbits      -- available with '-syslib misc'
80
81         ghc/lib/concurrent      -- Concurrent libraries         (libHSconc.a)
82                                 -- available with '-concurrent'
83 </verb> </tscreen>
84
85 Also, several non-standard prelude modules had their names changed to begin
86 with 'Prel' to reduce namespace pollution.
87
88 <tscreen> <verb>
89         Addr      ==> PrelAddr     (Addr interface available in 'exts')
90         ArrBase   ==> PrelArr
91         CCall     ==> PrelCCall    (CCall interface available in 'exts')
92         ConcBase  ==> PrelConc
93         GHCerr    ==> PrelErr
94         Foreign   ==> PrelForeign  (Foreign interface available in 'exts')
95         GHC       ==> PrelGHC
96         IOHandle  ==> PrelHandle
97         IOBase    ==> PrelIOBase
98         GHCmain   ==> PrelMain
99         STBase    ==> PrelST
100         Unsafe    ==> PrelUnsafe
101         UnsafeST  ==> PrelUnsafeST
102 </verb> </tscreen>
103
104 <item> Unboxed types are now not allowed in the field of a newtype
105 constructor.
106
107 <item> Report the context properly for type errors in newtype
108 declarations.
109
110 <item> User's Guide replaced with SGML version.
111
112 <item> The literate tools have been removed from the standard
113 distributions, since they're not needed to format the documentation
114 any more.
115
116 <item> Lots of bug-fixes to the multi-parameter type classes support.
117
118 <item> @alpha-dec-osf1@ and @alpha-dec-osf3@ are now separate
119 configurations.  It turns out that an @alpha-dec-osf3@ build doesn't
120 work on older versions of the OS.
121
122 </itemize>