Commit c1d0aa93 authored by simonmar's avatar simonmar
Browse files

[project @ 2003-03-18 10:28:15 by simonmar]

This should have been committed along with rev. 1.36 of Main.c (and
others) yesterday, but for some reason it got left out.

Change the way Main.main is run, so it now doesn't force the return
value.  Now 'main = return undefined' will run and exit successfully.

The change affects finalizers too - but since they have type IO (), it
won't do any harm not to evaluate the ().
parent aa448d76
/* ----------------------------------------------------------------------------
* $Id: RtsAPI.c,v 1.42 2003/02/06 10:04:57 simonmar Exp $
* $Id: RtsAPI.c,v 1.43 2003/03/18 10:28:15 simonmar Exp $
*
* (c) The GHC Team, 1998-2001
*
......@@ -415,16 +415,16 @@ rts_evalIO (HaskellObj p, /*out*/HaskellObj *ret)
}
/*
* Identical to rts_evalIO(), but won't create a new task/OS thread
* Identical to rts_evalLazyIO(), but won't create a new task/OS thread
* to evaluate the Haskell thread. Used by main() only. Hack.
*/
SchedulerStatus
rts_mainEvalIO(HaskellObj p, /*out*/HaskellObj *ret)
rts_mainLazyIO(HaskellObj p, /*out*/HaskellObj *ret)
{
StgTSO* tso;
tso = createStrictIOThread(RtsFlags.GcFlags.initialStkSize, p);
tso = createIOThread(RtsFlags.GcFlags.initialStkSize, p);
scheduleThread(tso);
return waitThread(tso, ret);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment