diff options
author | Sasha Bogicevic <sasa.bogicevic@pm.me> | 2021-04-20 18:13:35 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-26 23:58:56 -0400 |
commit | dd0a95a34657c5b6de003f7177242af990c924aa (patch) | |
tree | 7b12f93a1aac65a1072855243d3d6e08f15e79a5 /utils/ghc-pkg | |
parent | 72c1812feecd2aff2a96b629063ba90a2f4cdb7b (diff) | |
download | haskell-dd0a95a34657c5b6de003f7177242af990c924aa.tar.gz |
18000 Use GHC.IO.catchException in favor of Exception.catch
fix #18000
Diffstat (limited to 'utils/ghc-pkg')
-rw-r--r-- | utils/ghc-pkg/Main.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index fc33f3ce37..a83f60b87a 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -78,6 +78,7 @@ import System.Exit ( exitWith, ExitCode(..) ) import System.Environment ( getArgs, getProgName, getEnv ) import System.IO import System.IO.Error +import GHC.IO ( catchException ) import GHC.IO.Exception (IOErrorType(InappropriateType)) import Data.List ( group, sort, sortBy, nub, partition, find , intercalate, intersperse, foldl', unfoldr @@ -750,7 +751,7 @@ getPkgDatabases verbosity mode use_user use_cache expand_vars my_flags = do else do db <- readParseDatabase verbosity mb_user_conf mode use_cache db_path - `Exception.catch` couldntOpenDbForModification db_path + `catchException` couldntOpenDbForModification db_path let ro_db = db { packageDbLock = GhcPkg.DbOpenReadOnly } return (ro_db, Just db) | db_path <- final_stack ] @@ -2236,7 +2237,7 @@ installSignalHandlers = do #endif catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a -catchIO = Exception.catch +catchIO = catchException tryIO :: IO a -> IO (Either Exception.IOException a) tryIO = Exception.try |