Change the way module initialisation is done (#3252, #4417)
[ghc-hetmet.git] / rts / Main.c
1 /* -----------------------------------------------------------------------------
2  *
3  * (c) The GHC Team 2009
4  *
5  * The C main() function for a standalone Haskell program.
6  *
7  * Note that this is not part of the RTS. It calls into the RTS to get things
8  * going. It is compiled to a separate Main.o which is linked into every
9  * standalone Haskell program that uses a Haskell Main.main function
10  * (as opposed to a mixed Haskell C program using a C main function).
11  *
12  * ---------------------------------------------------------------------------*/
13
14 #include "PosixSource.h"
15 #include "Rts.h"
16 #include "RtsMain.h"
17
18 /* Similarly, we can refer to the ZCMain_main_closure here */
19 extern StgClosure ZCMain_main_closure;
20
21 int main(int argc, char *argv[])
22 {
23     return hs_main(argc, argv, &ZCMain_main_closure);
24 }