Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data Dirs = Dirs
- { baseDir :: FilePath
- , binDir :: FilePath
- , cacheDir :: FilePath
- , logsDir :: FilePath
- , confDir :: FilePath
- , recycleDir :: FilePath -- mainly used on windows
- }
- deriving (Show, GHC.Generic)
- getAllDirs :: IO Dirs
- getAllDirs = do
- baseDir <- ghcupBaseDir
- binDir <- ghcupBinDir
- cacheDir <- ghcupCacheDir
- logsDir <- ghcupLogsDir
- confDir <- ghcupConfigDir
- recycleDir <- ghcupRecycleDir
- pure Dirs { .. }
- -- somewhere in main
- dirs@Dirs{..} <- getAllDirs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement