summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/target-contents/TargetContents.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghc-api/target-contents/TargetContents.hs')
-rw-r--r--testsuite/tests/ghc-api/target-contents/TargetContents.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-api/target-contents/TargetContents.hs b/testsuite/tests/ghc-api/target-contents/TargetContents.hs
index a5ef99105f..f21b84ca87 100644
--- a/testsuite/tests/ghc-api/target-contents/TargetContents.hs
+++ b/testsuite/tests/ghc-api/target-contents/TargetContents.hs
@@ -6,6 +6,7 @@ import GHC.Driver.Session
import GHC
import Control.Monad
+import Control.Monad.Catch as MC (try)
import Control.Monad.IO.Class (liftIO)
import Data.List (intercalate)
import Data.Maybe
@@ -105,7 +106,7 @@ go label targets mods = do
liftIO $ hPutStrLn stderr $ "== " ++ label
t <- liftIO getCurrentTime
setTargets =<< catMaybes <$> mapM (mkTarget t) mods
- ex <- gtry $ load LoadAllTargets
+ ex <- MC.try $ load LoadAllTargets
case ex of
Left ex -> liftIO $ hPutStrLn stderr $ show (ex :: SourceError)
Right _ -> return ()