diff options
author | Oleg Grenrus <oleg.grenrus@iki.fi> | 2019-12-13 07:44:35 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-04 15:56:22 -0500 |
commit | ae6b62765b12b44163612488a94a9ac270b4dcc5 (patch) | |
tree | 75ce34c316b9e4056e1f9dc84fad8d34786cf215 /utils/ghc-pkg | |
parent | d561c8f6244f8280a2483e8753c38e39d34c1f01 (diff) | |
download | haskell-ae6b62765b12b44163612488a94a9ac270b4dcc5.tar.gz |
Update to Cabal submodule to v3.2.0.0-alpha3
Metric Increase:
haddock.Cabal
Diffstat (limited to 'utils/ghc-pkg')
-rw-r--r-- | utils/ghc-pkg/Main.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 13a85cbaef..c29e4cfd13 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -83,6 +83,7 @@ import qualified Data.Foldable as F import qualified Data.Traversable as F import qualified Data.Set as Set import qualified Data.Map as Map +import qualified Data.ByteString as BS #if defined(mingw32_HOST_OS) import GHC.ConsoleHandler @@ -948,7 +949,7 @@ readParseDatabase verbosity mb_user_conf mode use_cache path parseSingletonPackageConf :: Verbosity -> FilePath -> IO InstalledPackageInfo parseSingletonPackageConf verbosity file = do when (verbosity > Normal) $ infoLn ("reading package config: " ++ file) - readUTF8File file >>= fmap fst . parsePackageInfo + BS.readFile file >>= fmap fst . parsePackageInfo cachefilename :: FilePath cachefilename = "package.cache" @@ -1143,7 +1144,7 @@ registerPackage input verbosity my_flags multi_instance expanded <- if expand_env_vars then expandEnvVars s force else return s - (pkg, ws) <- parsePackageInfo expanded + (pkg, ws) <- parsePackageInfo $ toUTF8BS expanded when (verbosity >= Normal) $ infoLn "done." @@ -1177,7 +1178,7 @@ registerPackage input verbosity my_flags multi_instance changeDB verbosity (removes ++ [AddPackage pkg]) db_to_operate_on db_stack parsePackageInfo - :: String + :: BS.ByteString -> IO (InstalledPackageInfo, [ValidateWarning]) parsePackageInfo str = case parseInstalledPackageInfo str of |