From c1d0aa931d8468c5fc02f069f2a5f32b057f139c Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 18 Mar 2003 10:28:15 +0000 Subject: [PATCH] [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 (). --- ghc/rts/RtsAPI.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc/rts/RtsAPI.c b/ghc/rts/RtsAPI.c index 529135e..b92794c 100644 --- a/ghc/rts/RtsAPI.c +++ b/ghc/rts/RtsAPI.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $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); } -- 1.7.10.4