[project @ 1997-09-04 20:23:17 by sof]
[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         Lift(..),
56
57         -- and finally, all the unboxed primops of GHC!
58         module GHC
59
60        ) where
61
62 import GHC
63 import STBase
64 import UnsafeST
65 import PrelBase
66 import ByteArray
67 import MutableArray
68 import Monad
69 import IOBase
70 import Foreign
71
72 \end{code}