42d78a35187b1c70a4e1178f20ecbea33b31a470
[ghc-hetmet.git] / ghc / lib / glaExts / GlaExts.lhs
1 %
2 % (c) The AQUA Project, Glasgow University, 1994-1996
3 %
4 \section[GlaExts]{The @GlaExts@ interface}
5
6 The @GlaExts@ packages up various Glasgow extensions and
7 exports them all through one interface. The Idea being that
8 a Haskell program using a Glasgow extension doesn't have to
9 selective import of obscure/likely-to-move (believe me, we
10 really like to move functions around for the prelude bits!)
11 GHC interfaces - instead import the GlaExts rag bag and you should be away!
12
13 \begin{code}
14 module GlaExts
15
16        (
17         -- From module STBase, the PrimIO monad 
18         -- (an instance of ST):
19         PrimIO,
20         ST, RealWorld,
21
22         thenPrimIO,     -- 
23         returnPrimIO, 
24         seqPrimIO,
25         fixPrimIO, 
26         unsafePerformPrimIO, 
27         unsafeInterleavePrimIO,
28         
29         -- backwards compatibility
30         listPrimIO,        -- :: [PrimIO a] -> PrimIO [a]
31         mapPrimIO,         -- :: (a -> PrimIO b) -> [a] -> PrimIO [b]
32         mapAndUnzipPrimIO, -- :: (a -> PrimIO (b,c)) -> [a] -> PrimIO ([b],[c])
33
34
35         -- operations for interfacing IO and ST/PrimIO
36         --
37         stToIO,       -- :: ST RealWorld a -> IO a
38         primIOToIO,   -- :: PrimIO a       -> IO a
39         ioToST,       -- :: IO a -> ST RealWorld a
40         ioToPrimIO,   -- :: IO a -> PrimIO       a
41         thenIO_Prim,  -- :: PrimIO a -> (a -> IO b) -> IO b
42         seqIO_Prim,   -- :: PrimIO a -> IO b -> IO b
43
44         -- Everything from module ByteArray:
45         module ByteArray,
46
47         -- Same for Mutable(Byte)Array interface:
48         module MutableArray,
49         
50         -- the representation of some basic types:
51         Int(..),Addr(..),Word(..),Float(..),Double(..),Integer(..),Char(..),
52
53         -- misc bits
54         trace,
55
56         -- and finally, all the unboxed primops of GHC!
57         module GHC
58
59        ) where
60
61 import GHC
62 import STBase
63 import PrelBase
64 import ByteArray
65 import MutableArray
66 import Monad
67 import IOBase
68 import Foreign
69
70 \end{code}