Proposal: die to System.Exit (and/or Prelude)

Evan Laforge qdunkan at gmail.com
Mon Dec 16 01:54:14 UTC 2013


I always thought it was kind of bizarre how other languages (even
wordy old java) have "exit :: Int -> IO ()", but haskell has
"System.Exit.exitSuccess" and "System.Exit.exitWith (ExitFailure 42)".
 Yes it's higher level to say "success" and "failure" than "0" and
">0", but wow that's a lot of bureaucracy for something trivial.  And
it still lets you write (ExitFailure 0).

Anyway, +1 for System.Exit, -1 for Prelude, because I sometimes define
my own 'die'.


More information about the Libraries mailing list