[project @ 1997-05-19 00:12:10 by sof]
[ghc-hetmet.git] / ghc / compiler / prelude / PrelMods.lhs
1 %
2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
3 %
4 \section[PrelMods]{Definitions of prelude modules}
5
6 The strings identify built-in prelude modules.  They are
7 defined here so as to avod 
8
9 [oh dear, look like the recursive module monster caught up and
10  gobbled whoever was writing the above :-) -- SOF ]
11
12 \begin{code}
13 #include "HsVersions.h"
14
15 module PrelMods
16         (
17          gHC__, pRELUDE, pREL_BASE,
18          pREL_READ , pREL_NUM, pREL_LIST,
19          pREL_TUP  , pACKED_STRING, cONC_BASE,
20          iO_BASE   , mONAD, rATIO, iX,
21          sT_BASE   , aRR_BASE, fOREIGN, mAIN,
22          gHC_MAIN  , gHC_ERR
23         ) where
24
25 CHK_Ubiq() -- debugging consistency check
26 import UniqSet ( UniqSet(..), mkUniqSet, elementOfUniqSet )
27
28 \end{code}
29
30 Predicate used by RnIface to decide whether or not to
31 append a special suffix for prelude modules:
32
33 \begin{code}
34 preludeNames :: UniqSet FAST_STRING
35 preludeNames =
36  mkUniqSet
37    [ gHC__
38    , pRELUDE   , pREL_BASE
39    , pREL_READ , pREL_NUM
40    , pREL_LIST , pREL_TUP
41    , pACKED_STRING  , cONC_BASE
42    , iO_BASE   , mONAD
43    , rATIO     , iX
44    , sT_BASE   , aRR_BASE
45    , fOREIGN   , mAIN
46    , gHC_MAIN  , gHC_ERR
47    ]
48 \end{code}
49
50 \begin{code}
51 gHC__        = SLIT("GHC")         -- Primitive types and values
52
53 pRELUDE      = SLIT("Prelude")
54 pREL_BASE    = SLIT("PrelBase")
55 pREL_READ    = SLIT("PrelRead")
56 pREL_NUM     = SLIT("PrelNum")
57 pREL_LIST    = SLIT("PrelList")
58 pREL_TUP     = SLIT("PrelTup")
59 pACKED_STRING= SLIT("PackedString")
60 cONC_BASE    = SLIT("ConcBase")
61 iO_BASE      = SLIT("IOBase")
62 mONAD        = SLIT("Monad")
63 rATIO        = SLIT("Ratio")
64 iX           = SLIT("Ix")
65 sT_BASE      = SLIT("STBase")
66 aRR_BASE     = SLIT("ArrBase")
67 fOREIGN      = SLIT("Foreign")
68
69 mAIN         = SLIT("Main")
70 gHC_MAIN     = SLIT("GHCmain")
71 gHC_ERR      = SLIT("GHCerr")
72
73
74
75 \end{code}