[project @ 2000-03-14 01:30:21 by sof]
[ghc-hetmet.git] / ghc / rts / Prelude.h
1 /* -----------------------------------------------------------------------------
2  * $Id: Prelude.h,v 1.2 2000/03/13 13:00:00 sewardj Exp $
3  *
4  * (c) The GHC Team, 1998-1999
5  *
6  * Prelude identifiers that we sometimes need to refer to in the RTS.
7  *
8  * ---------------------------------------------------------------------------*/
9
10 #ifndef PRELUDE_H
11 #define PRELUDE_H
12
13 #ifdef COMPILING_RTS
14
15 #ifdef COMPILER
16 extern DLL_IMPORT const StgClosure PrelBase_Z91Z93_static_closure;
17 extern DLL_IMPORT const StgClosure PrelBase_Z40Z41_static_closure;
18 extern DLL_IMPORT const StgClosure PrelBase_True_static_closure;
19 extern DLL_IMPORT const StgClosure PrelBase_False_static_closure;
20 extern DLL_IMPORT const StgClosure PrelPack_unpackCString_closure;
21 extern DLL_IMPORT const StgClosure PrelException_stackOverflow_closure;
22 extern DLL_IMPORT const StgClosure PrelException_heapOverflow_closure;
23 extern DLL_IMPORT const StgClosure PrelException_PutFullMVar_static_closure;
24 extern DLL_IMPORT const StgClosure PrelException_NonTermination_static_closure;
25 extern const StgClosure PrelMain_mainIO_closure;
26
27 extern DLL_IMPORT const StgInfoTable PrelBase_Czh_static_info;
28 extern DLL_IMPORT const StgInfoTable PrelBase_Izh_static_info;
29 extern DLL_IMPORT const StgInfoTable PrelFloat_Fzh_static_info;
30 extern DLL_IMPORT const StgInfoTable PrelFloat_Dzh_static_info;
31 extern DLL_IMPORT const StgInfoTable PrelAddr_Azh_static_info;
32 extern DLL_IMPORT const StgInfoTable PrelAddr_Wzh_static_info;
33 extern DLL_IMPORT const StgInfoTable PrelBase_Czh_con_info;
34 extern DLL_IMPORT const StgInfoTable PrelBase_Izh_con_info;
35 extern DLL_IMPORT const StgInfoTable PrelFloat_Fzh_con_info;
36 extern DLL_IMPORT const StgInfoTable PrelFloat_Dzh_con_info;
37 extern DLL_IMPORT const StgInfoTable PrelAddr_Azh_con_info;
38 extern DLL_IMPORT const StgInfoTable PrelAddr_Wzh_con_info;
39 extern DLL_IMPORT const StgInfoTable PrelAddr_I64zh_con_info;
40 extern DLL_IMPORT const StgInfoTable PrelAddr_W64zh_con_info;
41 extern DLL_IMPORT const StgInfoTable PrelStable_StablePtr_static_info;
42 extern DLL_IMPORT const StgInfoTable PrelStable_StablePtr_con_info;
43
44 /* Define canonical names so we can abstract away from the actual
45  * module these names are defined in.
46  */
47
48 #define Nil_closure            PrelBase_ZMZN_static_closure
49 #define Unit_closure           PrelBase_Z0T_static_closure
50 #define True_closure           PrelBase_True_static_closure
51 #define False_closure          PrelBase_False_static_closure
52 #define stackOverflow_closure  PrelException_stackOverflow_closure
53 #define heapOverflow_closure   PrelException_heapOverflow_closure
54 #define PutFullMVar_closure    PrelException_PutFullMVar_static_closure
55 #define NonTermination_closure PrelException_NonTermination_static_closure
56 #define Czh_static_info        PrelBase_Czh_static_info
57 #define Izh_static_info        PrelBase_Izh_static_info
58 #define Fzh_static_info        PrelFloat_Fzh_static_info
59 #define Dzh_static_info        PrelFloat_Dzh_static_info
60 #define Azh_static_info        PrelAddr_Azh_static_info
61 #define Wzh_static_info        PrelAddr_Wzh_static_info
62 #define Czh_con_info           PrelBase_Czh_con_info
63 #define Izh_con_info           PrelBase_Izh_con_info
64 #define Fzh_con_info           PrelFloat_Fzh_con_info
65 #define Dzh_con_info           PrelFloat_Dzh_con_info
66 #define Azh_con_info           PrelAddr_Azh_con_info
67 #define Wzh_con_info           PrelAddr_Wzh_con_info
68 #define W64zh_con_info         PrelAddr_W64zh_con_info
69 #define I64zh_con_info         PrelAddr_I64zh_con_info
70 #define StablePtr_static_info  PrelStable_StablePtr_static_info
71 #define StablePtr_con_info     PrelStable_StablePtr_con_info
72
73 #define mainIO_closure         PrelMain_mainIO_closure
74 #define unpackCString_closure  PrelPack_unpackCString_closure
75
76 #else /* INTERPRETER, I guess */
77
78 extern const StgInfoTable Czh_con_info;
79 extern const StgInfoTable Izh_con_info;
80 extern const StgInfoTable I64zh_con_info;
81 extern const StgInfoTable Fzh_con_info;
82 extern const StgInfoTable Dzh_con_info;
83 extern const StgInfoTable Azh_con_info;
84 extern const StgInfoTable Wzh_con_info;
85 extern const StgInfoTable StablePtr_con_info;
86
87 extern const StgInfoTable Czh_static_info;
88 extern const StgInfoTable Izh_static_info;
89 extern const StgInfoTable I64zh_static_info;
90 extern const StgInfoTable Fzh_static_info;
91 extern const StgInfoTable Dzh_static_info;
92 extern const StgInfoTable Azh_static_info;
93 extern const StgInfoTable Wzh_static_info;
94 extern const StgInfoTable StablePtr_static_info;
95
96 #define W64zh_con_info        I64zh_con_info
97 #define W64zh_static_info     I64zh_con_info
98
99 #define PutFullMVar_closure    PrelException_PutFullMVar_static_closure
100 extern const StgInfoTable PutFullMVar_closure;
101
102 #endif
103
104 #endif /* COMPILING_RTS */
105
106 #endif /* PRELUDE_H */