Opened 15 years ago

Closed 14 years ago

Last modified 46 years ago

#523 closed bug (Fixed)

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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):


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

Change History (4)

comment:1 Changed 15 years ago by chak

Logged In: YES 

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.

comment:2 Changed 15 years ago by simonmar

Logged In: YES 

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:3 Changed 15 years ago by chak

Logged In: YES 

Yep, using an exceptions sounds like a good idea.  (And the
place where `getArgs' and `getProgName' get their values has
to be fixed.)

comment:4 Changed 14 years ago by simonmar

  • Status changed from assigned to closed
Logged In: YES 

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.