@@ -29,8 +29,8 @@ import Distribution.Simple.UserHooks ( Args )
29
29
import Distribution.Simple.Utils ( die , notice , rawSystemExitCode )
30
30
import Distribution.Text
31
31
32
- import Control.Monad ( when , unless )
33
- import System.Exit ( ExitCode (.. ), exitFailure , exitWith )
32
+ import Control.Monad ( when , unless , forM )
33
+ import System.Exit ( ExitCode (.. ), exitFailure , exitSuccess )
34
34
import System.Directory ( doesFileExist )
35
35
import System.FilePath ( (</>) , (<.>) )
36
36
@@ -77,17 +77,17 @@ bench args pkg_descr lbi flags = do
77
77
++ show (disp $ PD. benchmarkType bm)
78
78
exitFailure
79
79
80
- when ( not $ PD. hasBenchmarks pkg_descr) $ do
80
+ unless ( PD. hasBenchmarks pkg_descr) $ do
81
81
notice verbosity " Package has no benchmarks."
82
- exitWith ExitSuccess
82
+ exitSuccess
83
83
84
84
when (PD. hasBenchmarks pkg_descr && null enabledBenchmarks) $
85
85
die $ " No benchmarks enabled. Did you remember to configure with "
86
86
++ " \' --enable-benchmarks\' ?"
87
87
88
88
bmsToRun <- case benchmarkNames of
89
89
[] -> return enabledBenchmarks
90
- names -> flip mapM names $ \ bmName ->
90
+ names -> forM names $ \ bmName ->
91
91
let benchmarkMap = zip enabledNames enabledBenchmarks
92
92
enabledNames = map PD. benchmarkName enabledBenchmarks
93
93
allNames = map PD. benchmarkName pkgBenchmarks
0 commit comments