packages feed

hoogle-index 0.3.0 → 0.3.1

raw patch · 2 files changed

+23/−12 lines, 2 files

Files

Main.hs view
@@ -143,10 +143,9 @@         liftIO $ removeTree pkgTree          -- install textbase if necessary-        case listToMaybe $ haddockHTMLs ipkg of+        result <- runEitherT $ case listToMaybe $ haddockHTMLs ipkg of           Just docRoot | installTextBase cfg -> fmapLT show $ tryIO $ do             let TextBase content = tb-                PackageName name = pkgName $ sourcePackageId ipkg                 tbPath = docRoot </> name++".txt"             putStrLn $ "Installing textbase to "++tbPath             createDirectoryIfMissing True docRoot@@ -154,9 +153,13 @@           Nothing | installTextBase cfg -> do             liftIO $ putStrLn $ "Can't install textbase due to missing documentation directory"           _ -> return ()+        case result of+          Left e  -> liftIO $ putStrLn $ name++": Failed to install textbase: "++e+          Right _ -> return ()         return tb   where     pkg = sourcePackageId ipkg+    PackageName name = pkgName pkg  -- | A Hoogle database newtype Database = DB FilePath@@ -270,10 +273,10 @@       let failedMsg (pkgId, reason) = "  "++show (pkgName pkgId)++"\t"++reason       putStrLn $ unlines $ map failedMsg failed -    combined <- runEitherT (combineDBs idxs)-    case combined of-      Left e -> putStrLn $ "Error while combining databases: "++e-      Right db -> do-        res <- runEitherT $ installDB compiler pkgIdx db-        either print (const $ return ()) res+    res <- runEitherT $ do+        combined <- fmapLT ("Error while combining databases: "++)+                    $ combineDBs idxs+        installDB compiler pkgIdx combined+    either putStrLn return res+     mapM_ removeDB idxs
hoogle-index.cabal view
@@ -1,12 +1,20 @@ name:                hoogle-index-version:             0.3.0+version:             0.3.1 synopsis:            Easily generate Hoogle indices for installed packages-description:         Easily generate Hoogle indices for installed packages+description:+    'hoogle-index' is a small utility for generating indicies for local+    Hoogle installations.+    .+    > $ cabal install hoogle hoogle-index+    > $ hoogle-index    # this will take a while+    .+    Your Hoogle index now covers all of the packages locally installed.+ homepage:            http://github.com/bgamari/hoogle-index license:             BSD3 license-file:        LICENSE-author:              Ben Gamari-maintainer:          ben@smart-cactus.org+author:              Ben Gamari <ben@smart-cactus.org>+maintainer:          Ben Gamari <ben@smart-cactus.org> copyright:           (c) 2014 Ben Gamari category:            Documentation build-type:          Simple