diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,8 @@
 Changelog for Hoogle
 
+5.0.6
+    #196, make --local look for .cabal files as well
+    Fix up Frege documentation generation
 5.0.5
     #193, support multiple --local flags
     #195, add --home flag to server mode
diff --git a/hoogle.cabal b/hoogle.cabal
--- a/hoogle.cabal
+++ b/hoogle.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               hoogle
-version:            5.0.5
+version:            5.0.6
 license:            BSD3
 license-file:       LICENSE
 category:           Development
diff --git a/src/Action/Generate.hs b/src/Action/Generate.hs
--- a/src/Action/Generate.hs
+++ b/src/Action/Generate.hs
@@ -5,6 +5,7 @@
 import Data.List.Extra
 import System.FilePath
 import System.Directory.Extra
+import System.IO.Extra
 import Data.Tuple.Extra
 import Control.Exception.Extra
 import Data.IORef
@@ -13,7 +14,6 @@
 import qualified Data.Map as Map
 import qualified Data.Text as T
 import Control.Monad.Extra
-import Control.Applicative
 import Data.Monoid
 import System.Console.CmdArgs.Verbosity
 import Prelude
@@ -34,7 +34,6 @@
 import General.Timing
 import General.Str
 import System.Mem
-import System.IO
 import GHC.Stats
 import Action.CmdLine
 import General.Conduit
@@ -126,17 +125,25 @@
     return (cbl, want, source)
 
 
-readHaskellDirs :: Timing -> [FilePath] -> IO (Map.Map String Package, Set.Set String, Source IO (String, URL, LStr))
-readHaskellDirs timing dirs = do
-    packages <- map (takeBaseName &&& id) . filter ((==) ".txt" . takeExtension) <$> concatMapM listFilesRecursive dirs
+readHaskellDirs :: Timing -> Settings -> [FilePath] -> IO (Map.Map String Package, Set.Set String, Source IO (String, URL, LStr))
+readHaskellDirs timing settings dirs = do
+    files <- concatMapM listFilesRecursive dirs
+    let packages = map (takeBaseName &&& id) $ filter ((==) ".txt" . takeExtension) files
+    cabals <- mapM parseCabal $ filter ((==) ".cabal" . takeExtension) files
     let source = forM_ packages $ \(name, file) -> do
             src <- liftIO $ strReadFile file
             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
+    return (Map.union
+                (Map.fromList cabals)
+                (Map.fromList $ map ((,mempty{packageTags=[(T.pack "set",T.pack "all")]}) . fst) packages)
            ,Set.fromList $ map fst packages, source)
-
+  where
+    parseCabal fp = do
+        src <- readFileUTF8' fp
+        let pkg = readCabal settings src
+        return (takeBaseName fp, pkg)
 
 readFregeOnline :: Timing -> Download -> IO (Map.Map String Package, Set.Set String, Source IO (String, URL, LStr))
 readFregeOnline timing download = do
@@ -175,9 +182,9 @@
     (cbl, want, source) <- case language of
         Haskell | [""] <- local_ -> readHaskellGhcpkg timing settings
                 | [] <- local_ -> readHaskellOnline timing settings download
-                | otherwise -> readHaskellDirs timing local_
-        Frege | null local_ -> errorIO "No support for local Frege databases"
-              | otherwise -> readFregeOnline timing download
+                | otherwise -> readHaskellDirs timing settings local_
+        Frege | [] <- local_ -> readFregeOnline timing download
+              | otherwise -> errorIO "No support for local Frege databases"
     let (cblErrs, popularity) = packagePopularity cbl
     want <- return $ if include /= [] then Set.fromList include else want
 
diff --git a/src/Input/Cabal.hs b/src/Input/Cabal.hs
--- a/src/Input/Cabal.hs
+++ b/src/Input/Cabal.hs
@@ -4,7 +4,7 @@
 module Input.Cabal(
     Package(..),
     parseCabalTarball, readGhcPkg,
-    packagePopularity
+    packagePopularity, readCabal
     ) where
 
 import Input.Settings
