1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 1998-2004
5 * Prelude identifiers that we sometimes need to refer to in the RTS.
7 * ---------------------------------------------------------------------------*/
12 /* These definitions are required by the RTS .cmm files too, so we
13 * need declarations that we can #include into the generated .hc files.
16 #define PRELUDE_INFO(i) extern W_(i)[]
17 #define PRELUDE_CLOSURE(i) extern W_(i)[]
19 #define PRELUDE_INFO(i) extern DLL_IMPORT const StgInfoTable i
20 #define PRELUDE_CLOSURE(i) extern DLL_IMPORT StgClosure i
23 /* Define canonical names so we can abstract away from the actual
24 * modules these names are defined in.
27 PRELUDE_CLOSURE(GHCziBase_True_closure);
28 PRELUDE_CLOSURE(GHCziBase_False_closure);
29 PRELUDE_CLOSURE(GHCziPack_unpackCString_closure);
30 PRELUDE_CLOSURE(GHCziWeak_runFinalizzerBatch_closure);
33 extern W_ ZCMain_main_closure[];
35 extern StgClosure ZCMain_main_closure;
38 PRELUDE_CLOSURE(GHCziIOBase_stackOverflow_closure);
39 PRELUDE_CLOSURE(GHCziIOBase_heapOverflow_closure);
40 PRELUDE_CLOSURE(GHCziIOBase_BlockedOnDeadMVar_closure);
41 PRELUDE_CLOSURE(GHCziIOBase_BlockedIndefinitely_closure);
42 PRELUDE_CLOSURE(GHCziIOBase_NonTermination_closure);
44 PRELUDE_INFO(GHCziBase_Czh_static_info);
45 PRELUDE_INFO(GHCziBase_Izh_static_info);
46 PRELUDE_INFO(GHCziFloat_Fzh_static_info);
47 PRELUDE_INFO(GHCziFloat_Dzh_static_info);
48 PRELUDE_INFO(Addr_Azh_static_info);
49 PRELUDE_INFO(GHCziPtr_Ptr_static_info);
50 PRELUDE_INFO(GHCziPtr_FunPtr_static_info);
51 PRELUDE_INFO(GHCziInt_I8zh_static_info);
52 PRELUDE_INFO(GHCziInt_I16zh_static_info);
53 PRELUDE_INFO(GHCziInt_I32zh_static_info);
54 PRELUDE_INFO(GHCziInt_I64zh_static_info);
55 PRELUDE_INFO(GHCziWord_Wzh_static_info);
56 PRELUDE_INFO(GHCziWord_W8zh_static_info);
57 PRELUDE_INFO(GHCziWord_W16zh_static_info);
58 PRELUDE_INFO(GHCziWord_W32zh_static_info);
59 PRELUDE_INFO(GHCziWord_W64zh_static_info);
60 PRELUDE_INFO(GHCziBase_Czh_con_info);
61 PRELUDE_INFO(GHCziBase_Izh_con_info);
62 PRELUDE_INFO(GHCziFloat_Fzh_con_info);
63 PRELUDE_INFO(GHCziFloat_Dzh_con_info);
64 PRELUDE_INFO(GHCziPtr_Ptr_con_info);
65 PRELUDE_INFO(GHCziPtr_FunPtr_con_info);
66 PRELUDE_INFO(Addr_Azh_con_info);
67 PRELUDE_INFO(GHCziWord_Wzh_con_info);
68 PRELUDE_INFO(GHCziInt_I8zh_con_info);
69 PRELUDE_INFO(GHCziInt_I16zh_con_info);
70 PRELUDE_INFO(GHCziInt_I32zh_con_info);
71 PRELUDE_INFO(GHCziInt_I64zh_con_info);
72 PRELUDE_INFO(GHCziWord_W8zh_con_info);
73 PRELUDE_INFO(GHCziWord_W16zh_con_info);
74 PRELUDE_INFO(GHCziWord_W32zh_con_info);
75 PRELUDE_INFO(GHCziWord_W64zh_con_info);
76 PRELUDE_INFO(GHCziStable_StablePtr_static_info);
77 PRELUDE_INFO(GHCziStable_StablePtr_con_info);
79 #define True_closure (&GHCziBase_True_closure)
80 #define False_closure (&GHCziBase_False_closure)
81 #define unpackCString_closure (&GHCziPack_unpackCString_closure)
82 #define runFinalizerBatch_closure (&GHCziWeak_runFinalizzerBatch_closure)
83 #define mainIO_closure (&ZCMain_main_closure)
85 #define stackOverflow_closure (&GHCziIOBase_stackOverflow_closure)
86 #define heapOverflow_closure (&GHCziIOBase_heapOverflow_closure)
87 #define BlockedOnDeadMVar_closure (&GHCziIOBase_BlockedOnDeadMVar_closure)
88 #define BlockedIndefinitely_closure (&GHCziIOBase_BlockedIndefinitely_closure)
89 #define NonTermination_closure (&GHCziIOBase_NonTermination_closure)
91 #define Czh_static_info (&GHCziBase_Czh_static_info)
92 #define Fzh_static_info (&GHCziFloat_Fzh_static_info)
93 #define Dzh_static_info (&GHCziFloat_Dzh_static_info)
94 #define Azh_static_info (&Addr_Azh_static_info)
95 #define Izh_static_info (&GHCziBase_Izh_static_info)
96 #define I8zh_static_info (&GHCziInt_I8zh_static_info)
97 #define I16zh_static_info (&GHCziInt_I16zh_static_info)
98 #define I32zh_static_info (&GHCziInt_I32zh_static_info)
99 #define I64zh_static_info (&GHCziInt_I64zh_static_info)
100 #define Wzh_static_info (&GHCziWord_Wzh_static_info)
101 #define W8zh_static_info (&GHCziWord_W8zh_static_info)
102 #define W16zh_static_info (&GHCziWord_W16zh_static_info)
103 #define W32zh_static_info (&GHCziWord_W32zh_static_info)
104 #define W64zh_static_info (&GHCziWord_W64zh_static_info)
105 #define Ptr_static_info (&GHCziPtr_Ptr_static_info)
106 #define FunPtr_static_info (&GHCziPtr_FunPtr_static_info)
107 #define Czh_con_info (&GHCziBase_Czh_con_info)
108 #define Izh_con_info (&GHCziBase_Izh_con_info)
109 #define Fzh_con_info (&GHCziFloat_Fzh_con_info)
110 #define Dzh_con_info (&GHCziFloat_Dzh_con_info)
111 #define Azh_con_info (&Addr_Azh_con_info)
112 #define Wzh_con_info (&GHCziWord_Wzh_con_info)
113 #define W8zh_con_info (&GHCziWord_W8zh_con_info)
114 #define W16zh_con_info (&GHCziWord_W16zh_con_info)
115 #define W32zh_con_info (&GHCziWord_W32zh_con_info)
116 #define W64zh_con_info (&GHCziWord_W64zh_con_info)
117 #define I8zh_con_info (&GHCziInt_I8zh_con_info)
118 #define I16zh_con_info (&GHCziInt_I16zh_con_info)
119 #define I32zh_con_info (&GHCziInt_I32zh_con_info)
120 #define I64zh_con_info (&GHCziInt_I64zh_con_info)
121 #define I64zh_con_info (&GHCziInt_I64zh_con_info)
122 #define Ptr_con_info (&GHCziPtr_Ptr_con_info)
123 #define FunPtr_con_info (&GHCziPtr_FunPtr_con_info)
124 #define StablePtr_static_info (&GHCziStable_StablePtr_static_info)
125 #define StablePtr_con_info (&GHCziStable_StablePtr_con_info)
127 #endif /* PRELUDE_H */