[ ghc-Bugs-413656 ] System.exitWith terminates GHCi
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 23 May 2001 03:33:58 -0700
Bugs item #413656, was updated on 2001-04-04 01:28
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=413656&group_id=8032
Category: Compiler
>Group: 5.00
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Manuel M. T. Chakravarty (chak)
>Assigned to: Simon Marlow (simonmar)
Summary: System.exitWith terminates GHCi
Initial Comment:
Loading package std ... linking ... done.
Prelude> System.exitWith System.ExitSuccess
FateAmenableToChange chak 448 (~):
Not suprising, but annoying when running a program
interactively that happens to terminate nicely using
System.exitWith.
----------------------------------------------------------------------
>Comment By: Simon Marlow (simonmar)
Date: 2001-05-23 03:33
Message:
Logged In: YES
user_id=48280
Fixed in 5.01 (will be in 5.02 release).
System.exitWith now raises an exception, System.getArgs
return [], and System.getProgName returns "<interactive>"
under GHCi.
----------------------------------------------------------------------
Comment By: Manuel M. T. Chakravarty (chak)
Date: 2001-04-04 23:17
Message:
Logged In: YES
user_id=10359
Yep, using an exceptions sounds like a good idea. (And the
place where `getArgs' and `getProgName' get their values has
to be fixed.)
----------------------------------------------------------------------
Comment By: Simon Marlow (simonmar)
Date: 2001-04-04 01:55
Message:
Logged In: YES
user_id=48280
Yes, we know about this one. Probably the right fix is for
System.exitWith to raise an exception, for which we need a
new constructor in the Exception type. How does that
sound? It won't be fixed for 5.00, though.
Also, pressing ^C at the GHCi prompt causes strange things
to happen.
----------------------------------------------------------------------
Comment By: Manuel M. T. Chakravarty (chak)
Date: 2001-04-04 01:41
Message:
Logged In: YES
user_id=10359
Similarily, `getArgs' and `getProgName' should behave
differently in an interactive session and the interpreter
should allow to set the values returned by these two
routines. So, I guess, a special version of System for
interactive use is needed.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=413656&group_id=8032