[project @ 1997-11-20 16:49:04 by simonm]
[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 Compatibility cruft: Deprecated! Don't use!  This rug will
7 dissappear from underneath your feet very soon.
8
9 This module will eventually be the interface to GHC-ONLY extensions:
10 i.e. unboxery and primitive operations over unboxed values.
11
12 OLD:
13 The @GlaExts@ packages up various Glasgow extensions and
14 exports them all through one interface. The Idea being that
15 a Haskell program using a Glasgow extension doesn't have to
16 selective import of obscure/likely-to-move (believe me, we
17 really like to move functions around for the prelude bits!)
18 GHC interfaces - instead import the GlaExts rag bag and you should be away!
19
20 \begin{code}
21 module GlaExts
22
23        (
24         ST, RealWorld,
25
26         unsafePerformIO, 
27         unsafeInterleaveIO,
28         
29         -- operations for interfacing IO and ST
30         --
31         stToIO,       -- :: ST RealWorld a -> IO a
32         ioToST,       -- :: IO a -> ST RealWorld a
33
34         -- compatibility cruft
35         PrimIO,
36         ioToPrimIO,
37         primIOToIO,
38         unsafePerformPrimIO,
39
40         -- Everything from module ByteArray:
41         module ByteArray,
42
43         -- Same for Mutable(Byte)Array interface:
44         module MutableArray,
45         
46         -- the representation of some basic types:
47         Int(..),Addr(..),Word(..),Float(..),Double(..),Integer(..),Char(..),
48
49         -- misc bits
50         trace,
51         Lift(..),
52
53         -- and finally, all the unboxed primops of GHC!
54         module GHC
55
56        ) where
57
58 import GHC
59 import STBase
60 import IOExts
61 import PrelBase
62 import ByteArray
63 import MutableArray
64 import Monad
65 import IOBase
66 import Foreign
67
68 type PrimIO a = IO a
69 primIOToIO io = io
70 ioToPrimIO io = io
71 unsafePerformPrimIO = unsafePerformIO
72
73 \end{code}