aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-05-14 19:25:07 +0000
committerDavid Waern <david.waern@gmail.com>2010-05-14 19:25:07 +0000
commite32e53131b67414f090c06366d52f2a3c8ebae8b (patch)
tree8a1ab696761939a8c7aeea5bff9067749a6af2be /src
parentceb3a303b714255bfd789bab19ec6ea835e55e7d (diff)
Improve comments
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