diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2018-12-15 23:50:15 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-01-22 03:06:51 +0100 |
commit | 842de542f71616b6d828ea2f993f227e59f1ebc5 (patch) | |
tree | aa157c6864ea303f1abbf847dc4d500ede81e5c1 /src/CabalHelper/Compiletime/Sandbox.hs | |
parent | f844fb50da753332f2f37d4907336d7e7c2a04f2 (diff) |
Refactor Compile (for v2-install)
Diffstat (limited to 'src/CabalHelper/Compiletime/Sandbox.hs')
-rw-r--r-- | src/CabalHelper/Compiletime/Sandbox.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/CabalHelper/Compiletime/Sandbox.hs b/src/CabalHelper/Compiletime/Sandbox.hs index 5af226a..7a757c4 100644 --- a/src/CabalHelper/Compiletime/Sandbox.hs +++ b/src/CabalHelper/Compiletime/Sandbox.hs @@ -33,11 +33,13 @@ import Prelude import qualified Data.Traversable as T import CabalHelper.Shared.Common +import CabalHelper.Compiletime.Program.GHC + ( GhcVersion (..), showGhcVersion ) -- | Get the path to the sandbox package-db in a project getSandboxPkgDb :: String -- ^ Cabal build platform, i.e. @buildPlatform@ - -> Version + -> GhcVersion -- ^ GHC version (@cProjectVersion@ is your friend) -> FilePath -- ^ Path to the cabal package root directory (containing the @@ -54,9 +56,9 @@ getSandboxPkgDb platform ghcVer projdir = do True -> dir False -> takeDirectory dir </> ghcSandboxPkgDbDir platform ghcVer -ghcSandboxPkgDbDir :: String -> Version -> String +ghcSandboxPkgDbDir :: String -> GhcVersion -> String ghcSandboxPkgDbDir platform ghcVer = - platform ++ "-ghc-" ++ showVersion ghcVer ++ "-packages.conf.d" + platform ++ "-ghc-" ++ showGhcVersion ghcVer ++ "-packages.conf.d" -- | Extract the sandbox package db directory from the cabal.sandbox.config -- file. Exception is thrown if the sandbox config file is broken. |