Skip to content

Commit

Permalink
Refactor: Extracted variable to it easier to understand
Browse files Browse the repository at this point in the history
  • Loading branch information
jokesper committed Feb 8, 2024
1 parent 2336280 commit 764d416
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Action/CmdLine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ defaultDatabaseLang lang = do
xdgLocation <- getXdgDirectory XdgData "hoogle"
legacyLocation <- getAppUserDataDirectory "hoogle"
canIgnoreLegacyPath <- not <$> doesPathExist legacyLocation
pure $
(if canIgnoreLegacyPath then xdgLocation else legacyLocation) </>
"default-" ++ lower (show lang) ++ "-" ++ showVersion (trimVersion 3 version) ++ ".hoo"
let dir = if canIgnoreLegacyPath then xdgLocation else legacyLocation
pure $ dir </> "default-" ++ lower (show lang) ++ "-" ++ showVersion (trimVersion 3 version) ++ ".hoo"

getCmdLine :: [String] -> IO CmdLine
getCmdLine args = do
Expand Down

0 comments on commit 764d416

Please sign in to comment.