Haskell by Example: Exit

original
import System.Exit

main = do 
    exitWith $ ExitFailure 3
    putStrLn "!"
$ runhaskell exit.hs

$ ghc exit.hs -o exit
$ ./exit
$ echo $?
3
back to index