Skip to content

Commit

Permalink
expand lonely 'TODO' mark
Browse files Browse the repository at this point in the history
it was not clear what that TODO mark asked us to do. I found a second,
clearer TODO which asks us to do something with the line where this
first TODO is, so I am guessing that this was the reason for the first
TODO, so I am expanding the first TODO to point to the second.
  • Loading branch information
gelisam committed Dec 17, 2021
1 parent 0b8abaf commit 8af774b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cabal-install/src/Distribution/Client/ProjectPlanning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2600,9 +2600,13 @@ availableSourceTargets elab =
| otherwise -> TargetBuildable (elabUnitId elab, cname)
TargetRequestedByDefault

-- it is an optional stanza, so a testsuite or benchmark
-- it is an optional stanza, so a testsuite or benchmark.
--
-- TODO: once 'elabStanzasRequested' has been upgraded to an
-- ADT with three cases (see TODO note for 'elabStanzasRequested'),
-- use those to pick a better failure cause here.
Just stanza ->
case (optStanzaLookup stanza (elabStanzasRequested elab), -- TODO
case (optStanzaLookup stanza (elabStanzasRequested elab),
optStanzaSetMember stanza (elabStanzasAvailable elab)) of
_ | not withinPlan -> TargetNotLocal
(Just False, _) -> TargetDisabledByUser
Expand Down

0 comments on commit 8af774b

Please sign in to comment.