aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-10-26 04:19:48 +0200
committerDaniel Gröber <dxld@darkboxed.org>2018-10-27 20:48:56 +0200
commit385685dc9da4d95e39e17a323a69d12f1204c951 (patch)
tree9d4b8089d1729baefb91324b4401a8508c41c08c /lib
parentdfec1a97d8efde1fd4995f302bb0d16423cf1afd (diff)
Add some comments
Diffstat (limited to 'lib')
-rw-r--r--lib/Distribution/Helper.hs8
1 files changed, 7 insertions, 1 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