Skip to content

Commit

Permalink
Rename filtered die analogue to be clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
typedrat committed Jul 27, 2018
1 parent 04318ff commit d418022
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions cabal-install/Distribution/Client/ProjectBuilding.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,8 @@ buildAndInstallUnpackedPackage verbosity
isParallelBuild = buildSettingNumJobs >= 2

whenHaddock action
| hasValidHaddockTargets = action
| otherwise = return ()
| hasValidHaddockTargets pkg = action
| otherwise = return ()

configureCommand = Cabal.configureCommand defaultProgramDb
configureFlags v = flip filterConfigureFlags v $
Expand Down Expand Up @@ -1299,8 +1299,8 @@ buildInplaceUnpackedPackage verbosity
| otherwise = action

whenHaddock action
| hasValidHaddockTargets = action
| otherwise = return ()
| hasValidHaddockTargets pkg = action
| otherwise = return ()

whenReRegister action
= case buildStatus of
Expand Down
7 changes: 3 additions & 4 deletions cabal-install/Distribution/Client/ProjectOrchestration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ import Distribution.Simple.Command (commandShowOptions)
import Distribution.Simple.Configure (computeEffectiveProfiling)

import Distribution.Simple.Utils
( die'
, notice, noticeNoWrap, debugNoWrap )
( die', warn, notice, noticeNoWrap, debugNoWrap )
import Distribution.Verbosity
import Distribution.Text
import Distribution.Simple.Compiler
Expand Down Expand Up @@ -940,7 +939,7 @@ dieOnBuildFailures verbosity plan buildOutcomes

-- For all failures, print either a short summary (if we showed the
-- build log) or all details
fail' verbosity $ unlines
dieIfNotHaddockFailure verbosity $ unlines
[ case failureClassification of
ShowBuildSummaryAndLog reason _
| verbosity > normal
Expand Down Expand Up @@ -969,7 +968,7 @@ dieOnBuildFailures verbosity plan buildOutcomes
maybeToList (InstallPlan.lookup plan pkgid)
]

fail'
dieIfNotHaddockFailure
| all isHaddockFailure failuresClassification = warn
| otherwise = die'
where
Expand Down

0 comments on commit d418022

Please sign in to comment.