diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2018-12-15 23:02:29 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-01-22 03:06:51 +0100 |
commit | 66ff20ada55558ab1fda09f22f4f6f6de0736136 (patch) | |
tree | 34e8d4ad4c1f20e838993aebf2d81e460702da08 | |
parent | f958f2d07e8cd213014bff98de5e305e7ce84608 (diff) |
Move Shared.Sandbox module to Compiletime.
-rw-r--r-- | cabal-helper.cabal | 3 | ||||
-rw-r--r-- | lib/Distribution/Helper.hs | 6 | ||||
-rw-r--r-- | src/CabalHelper/Compiletime/Compile.hs | 3 | ||||
-rw-r--r-- | src/CabalHelper/Compiletime/Data.hs | 1 | ||||
-rw-r--r-- | src/CabalHelper/Compiletime/Sandbox.hs (renamed from src/CabalHelper/Shared/Sandbox.hs) | 4 | ||||
-rw-r--r-- | src/CabalHelper/Runtime/Compat.hs | 1 | ||||
-rw-r--r-- | src/CabalHelper/Runtime/Main.hs | 1 |
7 files changed, 8 insertions, 11 deletions
diff --git a/cabal-helper.cabal b/cabal-helper.cabal index 2727307..6d51c7b 100644 --- a/cabal-helper.cabal +++ b/cabal-helper.cabal @@ -116,11 +116,11 @@ library c-h-internal CabalHelper.Compiletime.Program.CabalInstall CabalHelper.Compiletime.Program.Stack CabalHelper.Compiletime.Program.GHC + CabalHelper.Compiletime.Sandbox CabalHelper.Compiletime.Types CabalHelper.Compiletime.Types.RelativePath CabalHelper.Shared.Common CabalHelper.Shared.InterfaceTypes - CabalHelper.Shared.Sandbox other-modules: Paths_cabal_helper autogen-modules: @@ -165,7 +165,6 @@ executable cabal-helper-main CabalHelper.Runtime.Compat CabalHelper.Shared.Common CabalHelper.Shared.InterfaceTypes - CabalHelper.Shared.Sandbox CabalHelper.Shared.Common -- This component is usually built at runtime but during development it's diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index 3492be1..ba8c2dd 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -123,10 +123,10 @@ import CabalHelper.Compiletime.Compile import qualified CabalHelper.Compiletime.Program.Stack as Stack import qualified CabalHelper.Compiletime.Program.GHC as GHC import qualified CabalHelper.Compiletime.Program.CabalInstall as CabalInstall +import CabalHelper.Compiletime.Sandbox import CabalHelper.Compiletime.Types import CabalHelper.Compiletime.Types.RelativePath import CabalHelper.Shared.InterfaceTypes -import CabalHelper.Shared.Sandbox import CabalHelper.Shared.Common import CabalHelper.Compiletime.Compat.Version @@ -523,8 +523,8 @@ getSandboxPkgDb -- ^ Path to the project directory, i.e. a directory containing a -- @cabal.sandbox.config@ file -> IO (Maybe FilePath) -getSandboxPkgDb buildPlat ghc_ver projdir = - CabalHelper.Shared.Sandbox.getSandboxPkgDb buildPlat ghc_ver projdir +getSandboxPkgDb buildPlat ghcVer projdir = + CabalHelper.Compiletime.Sandbox.getSandboxPkgDb buildPlat ghcVer projdir buildPlatform :: String buildPlatform = display Distribution.System.buildPlatform diff --git a/src/CabalHelper/Compiletime/Compile.hs b/src/CabalHelper/Compiletime/Compile.hs index c1c3bc4..2f4b0a9 100644 --- a/src/CabalHelper/Compiletime/Compile.hs +++ b/src/CabalHelper/Compiletime/Compile.hs @@ -58,10 +58,11 @@ import CabalHelper.Compiletime.Data import CabalHelper.Compiletime.Log import CabalHelper.Compiletime.Program.GHC import CabalHelper.Compiletime.Program.CabalInstall +import CabalHelper.Compiletime.Sandbox + ( getSandboxPkgDb ) import CabalHelper.Compiletime.Types import CabalHelper.Shared.Common -import CabalHelper.Shared.Sandbox (getSandboxPkgDb) data Compile = CompileWithCabalSource diff --git a/src/CabalHelper/Compiletime/Data.hs b/src/CabalHelper/Compiletime/Data.hs index 9fb5a53..07cf2d2 100644 --- a/src/CabalHelper/Compiletime/Data.hs +++ b/src/CabalHelper/Compiletime/Data.hs @@ -87,7 +87,6 @@ runtimeSources = $( [ ("Runtime/Main.hs") , ("Runtime/Compat.hs") , ("Shared/Common.hs") - , ("Shared/Sandbox.hs") , ("Shared/InterfaceTypes.hs") ] in do diff --git a/src/CabalHelper/Shared/Sandbox.hs b/src/CabalHelper/Compiletime/Sandbox.hs index d2172a2..5af226a 100644 --- a/src/CabalHelper/Shared/Sandbox.hs +++ b/src/CabalHelper/Compiletime/Sandbox.hs @@ -20,7 +20,7 @@ Description : Extracting information from @cabal.sandbox.config@ files License : GPL-3 -} -module CabalHelper.Shared.Sandbox where +module CabalHelper.Compiletime.Sandbox where import Control.Applicative import Data.Char @@ -67,7 +67,7 @@ extractSandboxDbDir conf = extractValue <$> parse conf keyLen = length key parse = listToMaybe . filter (key `isPrefixOf`) . lines - extractValue = CabalHelper.Shared.Sandbox.dropWhileEnd isSpace . dropWhile isSpace . drop keyLen + extractValue = CabalHelper.Compiletime.Sandbox.dropWhileEnd isSpace . dropWhile isSpace . drop keyLen -- dropWhileEnd is not provided prior to base 4.5.0.0. dropWhileEnd :: (a -> Bool) -> [a] -> [a] diff --git a/src/CabalHelper/Runtime/Compat.hs b/src/CabalHelper/Runtime/Compat.hs index 8c32adf..eb87163 100644 --- a/src/CabalHelper/Runtime/Compat.hs +++ b/src/CabalHelper/Runtime/Compat.hs @@ -134,7 +134,6 @@ import Distribution.Types.GenericPackageDescription #endif -import CabalHelper.Shared.Sandbox import CabalHelper.Shared.Common import CabalHelper.Shared.InterfaceTypes diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs index 2a72f37..775f6b0 100644 --- a/src/CabalHelper/Runtime/Main.hs +++ b/src/CabalHelper/Runtime/Main.hs @@ -226,7 +226,6 @@ import System.IO import System.IO.Unsafe (unsafeInterleaveIO, unsafePerformIO) import Text.Printf -import CabalHelper.Shared.Sandbox import CabalHelper.Shared.Common import CabalHelper.Shared.InterfaceTypes import CabalHelper.Runtime.Compat |