aboutsummaryrefslogtreecommitdiff
path: root/CabalHelper/Compiletime/Log.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CabalHelper/Compiletime/Log.hs')
-rw-r--r--CabalHelper/Compiletime/Log.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/CabalHelper/Compiletime/Log.hs b/CabalHelper/Compiletime/Log.hs
index 6931fa9..ec38f88 100644
--- a/CabalHelper/Compiletime/Log.hs
+++ b/CabalHelper/Compiletime/Log.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
module CabalHelper.Compiletime.Log where
import Control.Monad
@@ -14,8 +16,8 @@ vLog Options { verbose = True } msg =
liftIO $ hPutStrLn stderr msg
vLog _ _ = return ()
-logSomeError :: Options -> String -> IO (Maybe a) -> IO (Maybe a)
-logSomeError opts label a = do
- a `E.catch` \se@(SomeException _) -> do
- vLog opts $ label ++ ": " ++ show se
+logIOError :: Options -> String -> IO (Maybe a) -> IO (Maybe a)
+logIOError opts label a = do
+ a `E.catch` \(ex :: IOError) -> do
+ vLog opts $ label ++ ": " ++ E.displayException ex
return Nothing