packages feed

hoogle 5.0.17 → 5.0.17.1

raw patch · 7 files changed

+28/−7 lines, 7 filesdep ~extradep ~networkPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: extra, network

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,8 @@ Changelog for Hoogle +2.0.17.1, released 2018-01-27+    #238, only identify the database by the first three version components+    #236, in --local mode replace file:// links in Haddock pages 5.0.17, released 2018-01-17     Add lower bounds for time and bytestring     #234, allow http-conduit-0.15
README.md view
@@ -71,6 +71,10 @@  Which will download and build Hoogle databases. +## Command Line UI++There is a terminal/curses based UI available through [`cabal install bhoogle`](https://hackage.haskell.org/package/bhoogle).+ ## Chrome Integration  **As a keyword search:** With a keyword search you can type `h map` directly into the location bar to perform a Hoogle search. Go to the [Hoogle website](http://haskell.org/hoogle/) in Chrome, right-click in the Hoogle search field and select "Add as a search engine...". Give it a keyword such as "h".
hoogle.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.18 build-type:         Simple name:               hoogle-version:            5.0.17+version:            5.0.17.1 license:            BSD3 license-file:       LICENSE category:           Development@@ -15,7 +15,7 @@     or by approximate type signature. homepage:           http://hoogle.haskell.org/ bug-reports:        https://github.com/ndmitchell/hoogle/issues-tested-with:        GHC==8.2.1, GHC==8.0.2, GHC==7.10.3+tested-with:        GHC==8.2.2, GHC==8.0.2, GHC==7.10.3 extra-doc-files:     README.md     CHANGES.txt
src/Action/CmdLine.hs view
@@ -14,6 +14,7 @@ import System.FilePath import Data.List.Extra import Data.Version+import General.Util import Paths_hoogle(version)  data Language = Haskell | Frege deriving (Data,Typeable,Show,Eq,Enum,Bounded)@@ -74,7 +75,7 @@ defaultDatabaseLang :: Language -> IO FilePath defaultDatabaseLang lang = do     dir <- getAppUserDataDirectory "hoogle"-    return $ dir </> "default-" ++ lower (show lang) ++ "-" ++ showVersion version ++ ".hoo"+    return $ dir </> "default-" ++ lower (show lang) ++ "-" ++ showVersion (trimVersion 3 version) ++ ".hoo"  getCmdLine :: [String] -> IO CmdLine getCmdLine args = do
src/Action/Server.hs view
@@ -125,8 +125,15 @@         let file = intercalate "/" $ filter (not . (== "..")) (x:xs)         return $ OutputFile $ file ++ (if hasTrailingPathSeparator file then "index.html" else "")     "file":xs | local -> do-        let x = ['/' | not isWindows] ++ intercalate "/" xs-        return $ OutputFile $ x ++ (if hasTrailingPathSeparator x then "index.html" else "")+        let x = ['/' | not isWindows] ++ intercalate "/" (dropWhile null xs)+        let file = x ++ (if hasTrailingPathSeparator x then "index.html" else "")+        if takeExtension file /= ".html" then+            return $ OutputFile file+         else do+            src <- readFile file+            -- Haddock incorrectly generates file:// on Windows, when it should be file:///+            -- so replace on file:// and drop all leading empty paths above+            return $ OutputHTML $ lstrPack $ replace "file://" "/file/" src     xs ->         -- avoid "" and ".." in the URLs, since they could be trying to browse on the server         return $ OutputFile $ joinPath $ htmlDir : filter (not . all (== '.')) xs
src/General/Store.hs view
@@ -35,8 +35,9 @@ import Paths_hoogle import Prelude --- ensure the string is always 25 chars long, so version numbers don't change its size-verString = BS.pack $ take 25 $ "HOOGLE-" ++ showVersion version ++ repeat ' '+-- Ensure the string is always 25 chars long, so version numbers don't change its size+-- Only use the first two components of the version number to identify the database+verString = BS.pack $ take 25 $ "HOOGLE-" ++ showVersion (trimVersion 3 version) ++ repeat ' '  --------------------------------------------------------------------- -- SERIALISATION HELPERS
src/General/Util.hs view
@@ -17,6 +17,7 @@     inRanges,     readMaybe,     parseTrailingVersion,+    trimVersion,     exitFail,     prettyTable,     hackagePackageURL, hackageModuleURL, hackageDeclURL, ghcModuleURL,@@ -43,6 +44,7 @@ import Control.DeepSeq import Control.Exception.Extra import Test.QuickCheck+import Data.Version import Data.Int import System.IO import System.Exit@@ -311,6 +313,9 @@         isLegal '.' = True         isLegal c = isAscii c && isAlphaNum c ++trimVersion :: Int -> Version -> Version+trimVersion i v = v{versionBranch = take 3 $ versionBranch v}  parseTrailingVersion :: String -> (String, [Int]) parseTrailingVersion = (reverse *** reverse) . f . reverse