hoogle 5.0.3 → 5.0.4
raw patch · 3 files changed
+9/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES.txt +4/−1
- hoogle.cabal +1/−1
- src/Action/Generate.hs +4/−2
CHANGES.txt view
@@ -1,7 +1,10 @@ Changelog for Hoogle +5.0.4+ #184, use file URLs for local docs+ #183, make --local look for .txt files recursively 5.0.3- #181, use the proper network constrains+ #181, use the proper network constraints Avoid deprecated Aeson modules 5.0.2 Move to haskell-src-exts-1.18
hoogle.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.10 build-type: Simple name: hoogle-version: 5.0.3+version: 5.0.4 license: BSD3 license-file: LICENSE category: Development
src/Action/Generate.hs view
@@ -128,10 +128,12 @@ readHaskellDir :: Timing -> FilePath -> IO (Map.Map String Package, Set.Set String, Source IO (String, URL, LStr)) readHaskellDir timing dir = do- packages <- map (takeBaseName &&& id) . filter ((==) ".txt" . takeExtension) <$> listFiles dir+ packages <- map (takeBaseName &&& id) . filter ((==) ".txt" . takeExtension) <$> listFilesRecursive dir let source = forM_ packages $ \(name, file) -> do src <- liftIO $ strReadFile file- yield (name, hackagePackageURL name, lstrFromChunks [src])+ dir <- liftIO $ canonicalizePath $ takeDirectory file+ let url = "file://" ++ ['/' | not $ "/" `isPrefixOf` dir] ++ replace "\\" "/" dir ++ "/"+ yield (name, url, lstrFromChunks [src]) return (Map.fromList $ map ((,mempty{packageTags=[(T.pack "set",T.pack "all")]}) . fst) packages ,Set.fromList $ map fst packages, source)