packages feed

hoogle 5.0.7 → 5.0.8

raw patch · 3 files changed

+12/−4 lines, 3 filesdep +process-extrasPVP ok

version bump matches the API change (PVP)

Dependencies added: process-extras

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for Hoogle +5.0.8+    #194, make --local work regardless of code page 5.0.7     #200, make sure the content-type is set properly 5.0.6
hoogle.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.18 build-type:         Simple name:               hoogle-version:            5.0.7+version:            5.0.8 license:            BSD3 license-file:       LICENSE category:           Development@@ -74,6 +74,7 @@         mmap,         old-locale,         process,+        process-extras,         resourcet,         tar,         template-haskell,
src/Input/Cabal.hs view
@@ -16,7 +16,9 @@ import Control.Monad import System.IO.Extra import General.Str-import System.Process+import System.Exit+import qualified System.Process.ByteString as BS+import qualified Data.ByteString.UTF8 as UTF8 import System.Directory import Data.Char import Data.Maybe@@ -74,13 +76,16 @@ readGhcPkg :: Settings -> IO (Map.Map String Package) readGhcPkg settings = do     topdir <- findExecutable "ghc-pkg"-    stdout <- readProcess "ghc-pkg" ["dump"] ""+    -- important to use BS process reading so it's in Binary format, see #194+    (exit, stdout, stderr) <- BS.readProcessWithExitCode "ghc-pkg" ["dump"] mempty+    when (exit /= ExitSuccess) $+        fail $ "Error when reading from ghc-pkg, " ++ show exit ++ "\n" ++ UTF8.toString stderr     let g (stripPrefix "$topdir" -> Just x) | Just t <- topdir = takeDirectory t ++ x         g x = x     let fixer p = p{packageLibrary = True, packageDocs = g <$> packageDocs p}     let f ((stripPrefix "name: " -> Just x):xs) = Just (x, fixer $ readCabal settings $ unlines xs)         f xs = Nothing-    return $ Map.fromList $ mapMaybe f $ splitOn ["---"] $ lines stdout+    return $ Map.fromList $ mapMaybe f $ splitOn ["---"] $ lines $ filter (/= '\r') $ UTF8.toString stdout   -- | Given a tarball of Cabal files, parse the latest version of each package.