Debian Codegraph @

debian/patches/global_database

raw symbols SCIP
1 Descriptionscip-debian debian haskell-hoogle 5.0.18.4+dfsg1-3 haskell-hoogle/patches/global_database#Description.: Use Debian's hoogle database
2 Allow hoogle to fall back to the Debian's global database
3 if the default doesn't exist.
4 Authorscip-debian debian haskell-hoogle 5.0.18.4+dfsg1-3 haskell-hoogle/patches/global_database#Author.: Ilias Tsitsimpis <[email protected]scip-debian . . . identity/`[email protected]`.>
5 Forwardedscip-debian debian haskell-hoogle 5.0.18.4+dfsg1-3 haskell-hoogle/patches/global_database#Forwarded.: no, Debian specific
6
7 Index: b/src/Action/CmdLine.hsscip-debian debian haskell-hoogle 5.0.18.4+dfsg1-3 haskell-hoogle/upstream/`src/Action/CmdLine.hs`:
8 ===================================================================
9 --- a/src/Action/CmdLine.hsscip-debian debian haskell-hoogle 5.0.18.4+dfsg1-3 haskell-hoogle/upstream/`src/Action/CmdLine.hs`:
10 +++ b/src/Action/CmdLine.hs
11 @@ -88,8 +88,16 @@ getCmdLine args = do
12 args <- withArgs args $ cmdArgsRun cmdLineMode
13
14 -- fill in the default database
15 + -- If a database has not been given, and the default does not exist,
16 + -- and this is not a generate command, fallback to the Debian database.
17 args <- if database args /= "" then pure args else do
18 - db <- defaultDatabaseLang $ language args; pure args{database=db}
19 + db <- defaultDatabaseLang $ language args
20 + let debdb = "/var/lib/hoogle/databases/default.hoo"
21 + db_exists <- doesFileExist db
22 + case args of
23 + Generate{..} -> pure $ args{database=db}
24 + _ | db_exists -> pure $ args{database=db}
25 + _ -> pure $ args{database=debdb}
26
27 -- fix up people using Hoogle 4 instructions
28 args <- case args of