fix for large stack allocations
[ghc.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 /* The symbol for the Haskell Main module's init function. It is safe to refer
19 * to it here because this Main.o object file will only be linked in if we are
20 * linking a Haskell program that uses a Haskell Main.main function.
21 */
22 extern void __stginit_ZCMain(void);
23
24 /* Similarly, we can refer to the ZCMain_main_closure here */
25 extern StgClosure ZCMain_main_closure;
26
27 int main(int argc, char *argv[])
28 {
29 return hs_main(argc, argv, &__stginit_ZCMain, &ZCMain_main_closure);
30 }