Only query directories once

This commit is contained in:
2020-07-31 20:10:40 +02:00
parent 122c54b51e
commit 7163b77837
3 changed files with 82 additions and 44 deletions

View File

@@ -158,14 +158,25 @@ data URLSource = GHCupURL
data Settings = Settings
{ cache :: Bool
{ -- * set by user
cache :: Bool
, noVerify :: Bool
, keepDirs :: KeepDirs
, downloader :: Downloader
, verbose :: Bool
-- * set on app start
, dirs :: Dirs
}
deriving Show
data Dirs = Dirs
{ baseDir :: Path Abs
, binDir :: Path Abs
, cacheDir :: Path Abs
, logsDir :: Path Abs
}
deriving Show
data KeepDirs = Always
| Errors