aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 3c746863..93b1927d 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -133,13 +133,12 @@ main = handleTopExceptions $ do
libDir <- getGhcLibDir flags
- -- We have one global error handler for all GHC source errors. Other kinds
- -- of exceptions will be propagated to the top-level error handler.
+ -- Catches all GHC source errors, then prints and re-throws them.
let handleSrcErrors action = flip handleSourceError action $ \err -> do
printExceptionAndWarnings err
liftIO exitFailure
- -- initialize GHC
+ -- Initialize GHC.
withGhc libDir (ghcFlags flags) $ \_ -> handleSrcErrors $ do
-- get packages supplied with --read-interface