Ticket #523 (closed bug: Fixed)

Opened 12 years ago

Last modified 43 years ago

System.exitWith terminates GHCi

Reported by: chak Owned by: simonmar
Priority: normal Milestone:
Component: Compiler Version: 5.0
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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.

Change History

Changed 12 years ago by chak

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.

Changed 12 years ago by simonmar

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.

Changed 12 years ago by chak

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.)

Changed 12 years ago by simonmar

  • status changed from assigned to closed
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.
Note: See TracTickets for help on using tickets.