/* -----------------------------------------------------------------------------
- * $Id: Main.c,v 1.15 2000/01/14 13:17:16 hwloidl Exp $
+ * $Id: Main.c,v 1.18 2000/03/14 09:55:05 simonmar Exp $
*
- * (c) The GHC Team 1998-1999
+ * (c) The GHC Team 1998-2000
*
* Main function for a standalone Haskell program.
*
#include "SchedAPI.h"
#include "RtsFlags.h"
#include "RtsUtils.h"
+#include "Prelude.h"
#ifdef DEBUG
# include "Printer.h" /* for printing */
fprintf(stderr, "Main Thread Started ...\n");
/* ToDo: Dump event for the main thread */
- status = rts_evalIO((StgClosure *)&mainIO_closure, NULL);
+ status = rts_evalIO(mainIO_closure, NULL);
} else {
/* Just to show we're alive */
IF_PAR_DEBUG(verbose,
# elif defined(GRAN)
/* ToDo: Dump event for the main thread */
- status = rts_evalIO((StgClosure *)&mainIO_closure, NULL);
+ status = rts_evalIO(mainIO_closure, NULL);
# else /* !PAR && !GRAN */
/* ToDo: want to start with a larger stack size */
- status = rts_evalIO((StgClosure *)&mainIO_closure, NULL);
+ status = rts_evalIO((StgClosure *)mainIO_closure, NULL);
# endif /* !PAR && !GRAN */
case Success:
exit_status = EXIT_SUCCESS;
break;
- case NoStatus:
- barf("main thread completed with no status");
+ default:
+ barf("main thread completed with invalid status");
}
shutdownHaskellAndExit(exit_status);
}