From 6b00a11733a8ae02c11e57a75265abd2dc77ecb0 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Thu, 14 Aug 2014 20:26:09 +0100 Subject: Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. --- src/Haddock/Utils.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Haddock/Utils.hs b/src/Haddock/Utils.hs index 9ccca362..ee7bfd0a 100644 --- a/src/Haddock/Utils.hs +++ b/src/Haddock/Utils.hs @@ -300,7 +300,11 @@ bye :: String -> IO a bye s = putStr s >> exitSuccess -dieMsg :: String -> IO () +die :: String -> IO a +die s = hPutStr stderr s >> exitWith (ExitFailure 1) + + +dieMsg :: String -> IO a dieMsg s = getProgramName >>= \prog -> die (prog ++ ": " ++ s) -- cgit v1.2.3