From c7b82f38d0cef96900dd23fbf291aebb5c9569a2 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 22 May 2015 09:22:44 +0300 Subject: [PATCH] Fix Hoogle database download --- Stackage/Database/Cron.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Stackage/Database/Cron.hs b/Stackage/Database/Cron.hs index 637b8bf..a0908d7 100644 --- a/Stackage/Database/Cron.hs +++ b/Stackage/Database/Cron.hs @@ -107,7 +107,6 @@ hoogleUrl :: SnapName -> Text hoogleUrl n = concat [ "https://s3.amazonaws.com/haddock.stackage.org/" , hoogleKey n - , ".gz" ] getHoogleDB :: Bool -- ^ print exceptions? @@ -120,11 +119,15 @@ getHoogleDB toPrint man name = do then return $ Just fp else do req' <- parseUrl $ unpack $ hoogleUrl name - let req = req' { checkStatus = \_ _ _ -> Nothing } + let req = req' + { checkStatus = \_ _ _ -> Nothing + , decompress = const False + } withResponse req man $ \res -> if responseStatus res == status200 then do createTree $ parent fptmp runResourceT $ bodyReaderSource (responseBody res) + $= ungzip $$ sinkFile fptmp rename fptmp fp return $ Just fp