1 /* -----------------------------------------------------------------------------
2 * $Id: Prelude.h,v 1.13 2001/01/11 17:25:56 simonmar Exp $
4 * (c) The GHC Team, 1998-2001
6 * Prelude identifiers that we sometimes need to refer to in the RTS.
8 * ---------------------------------------------------------------------------*/
13 /* Define canonical names so we can abstract away from the actual
14 * modules these names are defined in.
18 extern DLL_IMPORT const StgClosure PrelBase_True_closure;
19 extern DLL_IMPORT const StgClosure PrelBase_False_closure;
20 extern DLL_IMPORT const StgClosure PrelPack_unpackCString_closure;
21 extern DLL_IMPORT const StgClosure PrelWeak_runFinalizzerBatch_closure;
22 extern const StgClosure PrelMain_mainIO_closure;
24 extern DLL_IMPORT const StgClosure PrelIOBase_stackOverflow_closure;
25 extern DLL_IMPORT const StgClosure PrelIOBase_heapOverflow_closure;
26 extern DLL_IMPORT const StgClosure PrelIOBase_PutFullMVar_closure;
27 extern DLL_IMPORT const StgClosure PrelIOBase_BlockedOnDeadMVar_closure;
28 extern DLL_IMPORT const StgClosure PrelIOBase_NonTermination_closure;
30 extern DLL_IMPORT const StgInfoTable PrelBase_Czh_static_info;
31 extern DLL_IMPORT const StgInfoTable PrelBase_Izh_static_info;
32 extern DLL_IMPORT const StgInfoTable PrelFloat_Fzh_static_info;
33 extern DLL_IMPORT const StgInfoTable PrelFloat_Dzh_static_info;
34 extern DLL_IMPORT const StgInfoTable Addr_Azh_static_info;
35 extern DLL_IMPORT const StgInfoTable PrelPtr_Ptr_static_info;
36 extern DLL_IMPORT const StgInfoTable PrelInt_I8zh_static_info;
37 extern DLL_IMPORT const StgInfoTable PrelInt_I16zh_static_info;
38 extern DLL_IMPORT const StgInfoTable PrelInt_I32zh_static_info;
39 extern DLL_IMPORT const StgInfoTable PrelInt_I64zh_static_info;
40 extern DLL_IMPORT const StgInfoTable PrelWord_Wzh_static_info;
41 extern DLL_IMPORT const StgInfoTable PrelWord_W8zh_static_info;
42 extern DLL_IMPORT const StgInfoTable PrelWord_W16zh_static_info;
43 extern DLL_IMPORT const StgInfoTable PrelWord_W32zh_static_info;
44 extern DLL_IMPORT const StgInfoTable PrelWord_W64zh_static_info;
45 extern DLL_IMPORT const StgInfoTable PrelBase_Czh_con_info;
46 extern DLL_IMPORT const StgInfoTable PrelBase_Izh_con_info;
47 extern DLL_IMPORT const StgInfoTable PrelFloat_Fzh_con_info;
48 extern DLL_IMPORT const StgInfoTable PrelFloat_Dzh_con_info;
49 extern DLL_IMPORT const StgInfoTable PrelPtr_Ptr_con_info;
50 extern DLL_IMPORT const StgInfoTable Addr_Azh_con_info;
51 extern DLL_IMPORT const StgInfoTable PrelWord_Wzh_con_info;
52 extern DLL_IMPORT const StgInfoTable PrelInt_I8zh_con_info;
53 extern DLL_IMPORT const StgInfoTable PrelInt_I16zh_con_info;
54 extern DLL_IMPORT const StgInfoTable PrelInt_I32zh_con_info;
55 extern DLL_IMPORT const StgInfoTable PrelInt_I64zh_con_info;
56 extern DLL_IMPORT const StgInfoTable PrelWord_W8zh_con_info;
57 extern DLL_IMPORT const StgInfoTable PrelWord_W16zh_con_info;
58 extern DLL_IMPORT const StgInfoTable PrelWord_W32zh_con_info;
59 extern DLL_IMPORT const StgInfoTable PrelWord_W64zh_con_info;
60 extern DLL_IMPORT const StgInfoTable PrelStable_StablePtr_static_info;
61 extern DLL_IMPORT const StgInfoTable PrelStable_StablePtr_con_info;
63 #define True_closure (&PrelBase_True_closure)
64 #define False_closure (&PrelBase_False_closure)
65 #define unpackCString_closure (&PrelPack_unpackCString_closure)
66 #define runFinalizerBatch_closure (&PrelWeak_runFinalizzerBatch_closure)
67 #define mainIO_closure (&PrelMain_mainIO_closure)
69 #define stackOverflow_closure (&PrelIOBase_stackOverflow_closure)
70 #define heapOverflow_closure (&PrelIOBase_heapOverflow_closure)
71 #define PutFullMVar_closure (&PrelIOBase_PutFullMVar_closure)
72 #define BlockedOnDeadMVar_closure (&PrelIOBase_BlockedOnDeadMVar_closure)
73 #define NonTermination_closure (&PrelIOBase_NonTermination_closure)
75 #define Czh_static_info (&PrelBase_Czh_static_info)
76 #define Fzh_static_info (&PrelFloat_Fzh_static_info)
77 #define Dzh_static_info (&PrelFloat_Dzh_static_info)
78 #define Azh_static_info (&Addr_Azh_static_info)
79 #define Izh_static_info (&PrelBase_Izh_static_info)
80 #define I8zh_static_info (&PrelInt_I8zh_static_info)
81 #define I16zh_static_info (&PrelInt_I16zh_static_info)
82 #define I32zh_static_info (&PrelInt_I32zh_static_info)
83 #define I64zh_static_info (&PrelInt_I64zh_static_info)
84 #define Wzh_static_info (&PrelWord_Wzh_static_info)
85 #define W8zh_static_info (&PrelWord_W8zh_static_info)
86 #define W16zh_static_info (&PrelWord_W16zh_static_info)
87 #define W32zh_static_info (&PrelWord_W32zh_static_info)
88 #define W64zh_static_info (&PrelWord_W64zh_static_info)
89 #define Ptr_static_info (&PrelPtr_Ptr_static_info)
90 #define Czh_con_info (&PrelBase_Czh_con_info)
91 #define Izh_con_info (&PrelBase_Izh_con_info)
92 #define Fzh_con_info (&PrelFloat_Fzh_con_info)
93 #define Dzh_con_info (&PrelFloat_Dzh_con_info)
94 #define Azh_con_info (&Addr_Azh_con_info)
95 #define Wzh_con_info (&PrelWord_Wzh_con_info)
96 #define W8zh_con_info (&PrelWord_W8zh_con_info)
97 #define W16zh_con_info (&PrelWord_W16zh_con_info)
98 #define W32zh_con_info (&PrelWord_W32zh_con_info)
99 #define W64zh_con_info (&PrelWord_W64zh_con_info)
100 #define I8zh_con_info (&PrelInt_I8zh_con_info)
101 #define I16zh_con_info (&PrelInt_I16zh_con_info)
102 #define I32zh_con_info (&PrelInt_I32zh_con_info)
103 #define I64zh_con_info (&PrelInt_I64zh_con_info)
104 #define I64zh_con_info (&PrelInt_I64zh_con_info)
105 #define Ptr_con_info (&PrelPtr_Ptr_con_info)
106 #define StablePtr_static_info (&PrelStable_StablePtr_static_info)
107 #define StablePtr_con_info (&PrelStable_StablePtr_con_info)
109 #else /* INTERPRETER */
111 /* We need indirections to the Prelude stuff, because we can't link
112 * these symbols statically.
114 extern const StgClosure *ind_True_closure;
115 extern const StgClosure *ind_False_closure;
116 extern const StgClosure *ind_unpackCString_closure;
117 extern const StgClosure *ind_runFinalizerBatch_closure;
119 extern const StgClosure *ind_stackOverflow_closure;
120 extern const StgClosure *ind_heapOverflow_closure;
121 extern const StgClosure *ind_PutFullMVar_closure;
122 extern const StgClosure *ind_BlockedOnDeadMVar_closure;
123 extern const StgClosure *ind_NonTermination_closure;
125 extern const StgInfoTable *ind_Czh_static_info;
126 extern const StgInfoTable *ind_Izh_static_info;
127 extern const StgInfoTable *ind_Fzh_static_info;
128 extern const StgInfoTable *ind_Dzh_static_info;
129 extern const StgInfoTable *ind_Azh_static_info;
130 extern const StgInfoTable *ind_Wzh_static_info;
131 extern const StgInfoTable *ind_Czh_con_info;
132 extern const StgInfoTable *ind_Izh_con_info;
133 extern const StgInfoTable *ind_Fzh_con_info;
134 extern const StgInfoTable *ind_Dzh_con_info;
135 extern const StgInfoTable *ind_Azh_con_info;
136 extern const StgInfoTable *ind_Wzh_con_info;
137 extern const StgInfoTable *ind_I64zh_con_info;
138 extern const StgInfoTable *ind_W64zh_con_info;
139 extern const StgInfoTable *ind_StablePtr_static_info;
140 extern const StgInfoTable *ind_StablePtr_con_info;
142 #define True_closure ind_True_closure
143 #define False_closure ind_False_closure
144 #define unpackCString_closure ind_unpackCString_closure
145 #define runFinalizerBatch_closure ind_runFinalizerBatch_closure
147 #define stackOverflow_closure ind_stackOverflow_closure
148 #define heapOverflow_closure ind_heapOverflow_closure
149 #define PutFullMVar_closure ind_PutFullMVar_closure
150 #define BlockedOnDeadMVar_closure ind_BlockedOnDeadMVar_closure
151 #define NonTermination_closure ind_NonTermination_closure
153 #define Czh_static_info ind_Czh_static_info
154 #define Izh_static_info ind_Izh_static_info
155 #define Fzh_static_info ind_Fzh_static_info
156 #define Dzh_static_info ind_Dzh_static_info
157 #define Azh_static_info ind_Azh_static_info
158 #define Wzh_static_info ind_Wzh_static_info
159 #define Czh_con_info ind_Czh_con_info
160 #define Izh_con_info ind_Izh_con_info
161 #define Fzh_con_info ind_Fzh_con_info
162 #define Dzh_con_info ind_Dzh_con_info
163 #define Azh_con_info ind_Azh_con_info
164 #define Wzh_con_info ind_Wzh_con_info
165 #define W64zh_con_info ind_W64zh_con_info
166 #define I64zh_con_info ind_I64zh_con_info
167 #define StablePtr_static_info ind_StablePtr_static_info
168 #define StablePtr_con_info ind_StablePtr_con_info
171 /* The Inj constructor. Not present in combined mode or compiled code. */
173 extern const StgInfoTable *ind_Inj_con_info;
174 #define Inj_con_info ind_Inj_con_info
180 void fixupRTStoPreludeRefs( void*(*)(char*) );
182 #endif /* PRELUDE_H */