diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2018-10-26 04:19:48 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2018-10-27 20:48:56 +0200 |
commit | 385685dc9da4d95e39e17a323a69d12f1204c951 (patch) | |
tree | 9d4b8089d1729baefb91324b4401a8508c41c08c | |
parent | dfec1a97d8efde1fd4995f302bb0d16423cf1afd (diff) |
Add some comments
-rw-r--r-- | lib/Distribution/Helper.hs | 8 | ||||
-rw-r--r-- | tests/GhcSession.hs | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index fe9ef44..8a4676b 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -341,7 +341,7 @@ reconfigureUnit :: QueryEnvI c pt -> Unit -> IO () reconfigureUnit QueryEnv{qeDistDir=DistDirV1{}, ..} Unit{uPackageDir=_} = do return () reconfigureUnit QueryEnv{qeDistDir=DistDirV2{}, ..} Unit{uPackageDir=_} = do - return () + return () -- TODO: new-build --only-configure reconfigureUnit QueryEnv{qeDistDir=DistDirStack{}, ..} Unit{uPackageDir} = do _ <- liftIO $ qeReadProcess (Just uPackageDir) (stackProgram qePrograms) ["stack", "build", "--only-configure", "."] "" @@ -458,6 +458,12 @@ planUnits plan = do return $ Just $ Left u takeunit _ = return $ Nothing +-- [Note Stack Cabal Version] +-- +-- Stack just uses a ghc-pkg invocation on the global-pkg-db to determine the +-- appropriate Cabal version for a resolver when building, see +-- Stack.GhcPkg.getCabalPkgVer. We do essentially the same thing here, but we +-- use --simple-output instead of using @ghc-pkg field@. readUnitInfo :: QueryEnvI c pt -> FilePath -> Unit -> IO UnitInfo readUnitInfo diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index ca91dd4..a4ccac8 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -152,8 +152,9 @@ compileModule nb ep opts = do ChExeEntrypoint m' ms -> let - -- The options first clear out includes, then put in the build dir. We want the - -- first one after that, so "regex-example" in the following case + -- The options first clear out includes, then put in the build + -- dir. We want the first one after that, so "regex-example" in + -- the following case -- -- ,"-i" -- ,"-idist/build/regex-example" |