aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper/Shared')
-rw-r--r--src/CabalHelper/Shared/Sandbox.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/CabalHelper/Shared/Sandbox.hs b/src/CabalHelper/Shared/Sandbox.hs
index 2f3774f..f7b7470 100644
--- a/src/CabalHelper/Shared/Sandbox.hs
+++ b/src/CabalHelper/Shared/Sandbox.hs
@@ -34,16 +34,17 @@ import Prelude
import qualified Data.Traversable as T
-- | Get the path to the sandbox package-db in a project
-getSandboxPkgDb :: FilePath
- -- ^ Path to the cabal package root directory (containing the
- -- @cabal.sandbox.config@ file)
- -> String
+getSandboxPkgDb :: String
-- ^ Cabal build platform, i.e. @buildPlatform@
-> Version
-- ^ GHC version (@cProjectVersion@ is your friend)
+ -> FilePath
+ -- ^ Path to the cabal package root directory (containing the
+ -- @cabal.sandbox.config@ file)
-> IO (Maybe FilePath)
-getSandboxPkgDb d platform ghcVer = do
- mConf <- T.traverse readFile =<< mightExist (d </> "cabal.sandbox.config")
+getSandboxPkgDb platform ghcVer projdir = do
+ mConf <-
+ T.traverse readFile =<< mightExist (projdir </> "cabal.sandbox.config")
return $ fixPkgDbVer <$> (extractSandboxDbDir =<< mConf)
where