[project @ 1996-06-05 06:44:31 by partain]
[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 \begin{code}
9 #include "HsVersions.h"
10
11 module PrelMods (
12         pRELUDE, pRELUDE_BUILTIN,
13         pRELUDE_LIST, pRELUDE_TEXT,
14         pRELUDE_PRIMIO, pRELUDE_IO, pRELUDE_PS,
15         gLASGOW_ST, gLASGOW_MISC,
16         pRELUDE_FB,
17         rATIO, iX,
18         
19         fromPrelude
20   ) where
21
22 CHK_Ubiq() -- debugging consistency check
23 \end{code}
24
25
26 \begin{code}
27 gLASGOW_MISC    = SLIT("PreludeGlaMisc")
28 gLASGOW_ST      = SLIT("PreludeGlaST")
29 pRELUDE         = SLIT("Prelude")
30 pRELUDE_BUILTIN = SLIT("PreludeBuiltin")
31 pRELUDE_FB      = SLIT("PreludeFoldrBuild")
32 pRELUDE_IO      = SLIT("PreludeIO")
33 pRELUDE_LIST    = SLIT("PreludeList")
34 pRELUDE_PRIMIO  = SLIT("PreludePrimIO")
35 pRELUDE_PS      = SLIT("PreludePS")
36 pRELUDE_TEXT    = SLIT("PreludeText")
37
38 rATIO = SLIT("Ratio")
39 iX = SLIT("Ix")
40
41 fromPrelude :: FAST_STRING -> Bool
42 fromPrelude s = (_SUBSTR_ s 0 6 == SLIT("Prelude"))
43   where
44     substr str beg end
45       = take (end - beg + 1) (drop beg str)
46 \end{code}