Signal failures with proper exit code
commitfa260c03859938fa8fcd040f7d0b99e39dddcc70
authorEcho Nolan <echo@echonolan.net>
dateThu 13 Oct 2016, 16:31 (10 years ago)
parent5a2f5a4
src/Idris/Main.hs+3−1
@@ -51,7 +51,9 @@ import Text.Trifecta.Result (ErrInfo(..), Result(..))
5151runMain :: Idris () -> IO ()
5252runMain prog = do res <- runExceptT $ execStateT prog idrisInit
5353 case res of
54− Left err -> putStrLn $ "Uncaught error: " ++ show err
54+ Left err -> do
55+ putStrLn $ "Uncaught error: " ++ show err
56+ exitFailure
5557 Right _ -> return ()
5658
5759