Skip to content
Snippets Groups Projects
Commit 64634aae authored by Matthew Pickering's avatar Matthew Pickering
Browse files

Add snapshotDirectory convention

parent 49b04ba1
No related branches found
No related tags found
No related merge requests found
module GHC.Debug.Convention (socketDirectory) where
module GHC.Debug.Convention (socketDirectory, snapshotDirectory, ghcDebugDirectory) where
import System.FilePath import System.FilePath
import System.Directory import System.Directory
-- | The default socket directory in which to place unix domain sockets in -- | The default socket directory in which to place unix domain sockets in
-- ghc-debug-stub. -- ghc-debug-stub. This is currently your XDG data directory.
socketDirectory :: IO FilePath ghcDebugDirectory :: IO FilePath
socketDirectory = do ghcDebugDirectory = do
xdgDir <- getXdgDirectory XdgData "" xdgDir <- getXdgDirectory XdgData ""
return (xdgDir </> "ghc-debug/debuggee/") return (xdgDir </> "ghc-debug/debuggee/")
socketDirectory :: IO FilePath
socketDirectory = (</> "sockets") <$> ghcDebugDirectory
snapshotDirectory :: IO FilePath
snapshotDirectory = (</> "snapshots") <$> ghcDebugDirectory
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment