Skip to content

Commit 1907598

Browse files
committed
Remove previous try
1 parent c032c48 commit 1907598

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs

+3-11
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,10 @@ traverseCondTreeBuildInfo
9393
traverseCondTreeBuildInfo g = node where
9494
mkCondNode :: comp -> [CondBranch v [Dependency] comp] -> CondTree v [Dependency] comp
9595
mkCondNode comp = CondNode comp (view L.targetBuildDepends comp)
96-
-- mkCondNode
97-
-- :: comp
98-
-- -> [Dependency]
99-
-- -> [CondBranch v [Dependency] comp]
100-
-- -> CondTree v [Dependency] comp
101-
-- mkCondNode comp deps = CondNode comp (view L.targetBuildDepends comp <> deps)
10296

103-
node (CondNode comp _deps branches) = mkCondNode
104-
<$> L.buildInfo g comp
105-
-- -- [HACK] we cannot operate on dependencies directly
106-
-- <*> fmap (view L.targetBuildDepends) (g (set L.targetBuildDepends deps mempty))
107-
<*> traverse branch branches
97+
node (CondNode comp _ branches) = mkCondNode
98+
<$> L.buildInfo g comp
99+
<*> traverse branch branches
108100

109101
branch (CondBranch v x y) = CondBranch v
110102
<$> node x

cabal-install/src/Distribution/Client/CmdRepl.hs

-2
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,6 @@ addDepsToProjectTarget deps pkgId ctx =
338338
| packageId pkg /= pkgId = SpecificSourcePackage pkg
339339
| SourcePackage{..} <- pkg =
340340
SpecificSourcePackage $ pkg { srcpkgDescription =
341-
-- srcpkgDescription & (\f -> L.allCondTrees $ traverseCondTreeC f)
342-
-- %~ (deps ++)
343341
srcpkgDescription & L.traverseBuildInfos
344342
%~ over L.targetBuildDepends (deps ++)
345343
}

cabal-testsuite/PackageTests/ReplBuildDepends/cabal.test.hs

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ main = do
55
let imports = "import qualified Data.ByteString as BS"
66
cabalTest' "normal" $ do
77
cabal' "clean" []
8-
res <- cabalWithStdin
9-
"repl"
10-
["-v2", "--build-depends", "bytestring"]
8+
res <- cabalWithStdin
9+
"repl"
10+
["-v2", "--build-depends", "bytestring"]
1111
imports
1212
assertOutputContains "Ok, one module loaded." res
1313
-- Ensure we can load ‘bytestring’
1414
assertOutputDoesNotContain "Could not load" res
1515
cabalTest' "allow-newer" $ do
1616
cabal' "clean" []
1717
res <- cabalWithStdin
18-
"repl"
19-
["-v2", "--build-depends", "bytestring", "--allow-newer"]
18+
"repl"
19+
["-v2", "--build-depends", "bytestring", "--allow-newer"]
2020
imports
2121
assertOutputContains "Ok, one module loaded." res
2222
-- Ensure we can load ‘bytestring’
@@ -25,8 +25,8 @@ main = do
2525
cabalTest' "allow-older" $ do
2626
cabal' "clean" []
2727
res <- cabalWithStdin
28-
"repl"
29-
["-v2", "--build-depends", "bytestring", "--allow-older"]
28+
"repl"
29+
["-v2", "--build-depends", "bytestring", "--allow-older"]
3030
imports
3131
assertOutputContains "Ok, one module loaded." res
3232
-- Ensure we can load ‘bytestring’

0 commit comments

Comments
 (0)