hoogle 4.2.8 → 4.2.9
raw patch · 4 files changed
+17/−14 lines, 4 filesdep +conduitdep −enumeratordep ~Cabaldep ~waidep ~warpPVP ok
version bump matches the API change (PVP)
Dependencies added: conduit
Dependencies removed: enumerator
Dependency ranges changed: Cabal, wai, warp
API changes (from Hackage documentation)
Files
- hoogle.cabal +6/−6
- src/CmdLine/Type.hs +1/−1
- src/General/Web.hs +8/−5
- src/Recipe/Download.hs +2/−2
hoogle.cabal view
@@ -1,13 +1,13 @@ cabal-version: >= 1.6 build-type: Simple name: hoogle-version: 4.2.8+version: 4.2.9 license: GPL license-file: docs/LICENSE category: Development author: Neil Mitchell <ndmitchell@gmail.com> maintainer: Neil Mitchell <ndmitchell@gmail.com>-copyright: Neil Mitchell 2004-2011+copyright: Neil Mitchell 2004-2012 synopsis: Haskell API Search description: Hoogle is a Haskell API search engine, which allows you to@@ -111,13 +111,13 @@ time, old-time, old-locale, cmdargs >= 0.7 && < 0.10, tagsoup >= 0.11 && < 0.13,- enumerator == 0.4.*, blaze-builder >= 0.2 && < 0.4, http-types == 0.6.*, case-insensitive >= 0.2 && < 0.5,- wai == 0.4.*,- warp == 0.4.*,- Cabal >= 1.8 && < 1.13+ conduit == 0.2.*,+ wai == 1.1.*,+ warp == 1.1.*,+ Cabal >= 1.8 && < 1.15 other-modules: CmdLine.All
src/CmdLine/Type.hs view
@@ -46,7 +46,7 @@ cmdLineMode = cmdArgsMode $ modes [search_ &= auto,data_,server,combine,convert,test,dump,rank,log_] &= verbosity &= program "hoogle"- &= summary ("Hoogle v" ++ showVersion version ++ ", (C) Neil Mitchell 2004-2011\nhttp://haskell.org/hoogle")+ &= summary ("Hoogle v" ++ showVersion version ++ ", (C) Neil Mitchell 2004-2012\nhttp://haskell.org/hoogle") search_ = Search {web = def &= typ "MODE" &= opt "web" &= help "Operate as a web tool"
src/General/Web.hs view
@@ -17,10 +17,11 @@ import Network.Wai import Network.HTTP.Types import Data.CaseInsensitive(original)-import Blaze.ByteString.Builder(toLazyByteString)-import Data.Enumerator.List(consume) import qualified Data.ByteString.Lazy.Char8 as LBS +import Blaze.ByteString.Builder(toLazyByteString)+import Data.Conduit.List(consume)+import Data.Conduit(($$),Flush,runResourceT,Flush(Chunk)) type Args = [(String, String)] @@ -32,9 +33,11 @@ responseNotFound x = responseLBS status404 [] $ fromString $ "File not found: " ++ x responseFlatten :: Response -> IO (Status, ResponseHeaders, LBString)-responseFlatten r = responseEnumerator r $ \s hs -> do- builders <- consume- return (s, hs, toLazyByteString $ mconcat builders)+responseFlatten r = do+ let (s,hs,rest) = responseSource r+ chunks <- runResourceT $ rest $$ consume+ let res = toLazyByteString $ mconcat [x | Chunk x <- chunks]+ return (s,hs,res) responseEvaluate :: Response -> IO ()
src/Recipe/Download.hs view
@@ -10,9 +10,9 @@ download :: CmdLine -> IO () download opt = do createDirectoryIfMissing True "download"- wget opt keywords "http://haskell.org/haskellwiki/Keywords"+ wget opt keywords "http://www.haskell.org/haskellwiki/Keywords" wget opt platform "http://code.galois.com/darcs/haskell-platform/haskell-platform.cabal"- wget opt "download/base.txt" "http://haskell.org/hoogle/base.txt"+ wget opt "download/base.txt" "http://www.haskell.org/hoogle/base.txt" wget opt "download/ghc.txt" "http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/ghc.txt" downloadTarball opt cabals "http://hackage.haskell.org/packages/archive/00-index.tar.gz" downloadTarball opt inputs "http://hackage.haskell.org/packages/archive/00-hoogle.tar.gz"