Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
38937f2a
Commit
38937f2a
authored
9 years ago
by
Mikhail Glushenkov
Browse files
Options
Downloads
Plain Diff
Merge pull request #2897 from Heather/patch-5
Bench.hs: use exitSuccess and forM
parents
f2278fc2
b603142d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/Distribution/Simple/Bench.hs
+5
-5
5 additions, 5 deletions
Cabal/Distribution/Simple/Bench.hs
with
5 additions
and
5 deletions
Cabal/Distribution/Simple/Bench.hs
+
5
−
5
View file @
38937f2a
...
...
@@ -29,8 +29,8 @@ import Distribution.Simple.UserHooks ( Args )
import
Distribution.Simple.Utils
(
die
,
notice
,
rawSystemExitCode
)
import
Distribution.Text
import
Control.Monad
(
when
,
unless
)
import
System.Exit
(
ExitCode
(
..
),
exitFailure
,
exit
With
)
import
Control.Monad
(
when
,
unless
,
forM
)
import
System.Exit
(
ExitCode
(
..
),
exitFailure
,
exit
Success
)
import
System.Directory
(
doesFileExist
)
import
System.FilePath
(
(
</>
),
(
<.>
)
)
...
...
@@ -77,9 +77,9 @@ bench args pkg_descr lbi flags = do
++
show
(
disp
$
PD
.
benchmarkType
bm
)
exitFailure
when
(
not
$
PD
.
hasBenchmarks
pkg_descr
)
$
do
unless
(
PD
.
hasBenchmarks
pkg_descr
)
$
do
notice
verbosity
"Package has no benchmarks."
exit
With
Exit
Success
exitSuccess
when
(
PD
.
hasBenchmarks
pkg_descr
&&
null
enabledBenchmarks
)
$
die
$
"No benchmarks enabled. Did you remember to configure with "
...
...
@@ -87,7 +87,7 @@ bench args pkg_descr lbi flags = do
bmsToRun
<-
case
benchmarkNames
of
[]
->
return
enabledBenchmarks
names
->
f
lip
map
M
names
$
\
bmName
->
names
->
f
or
M
names
$
\
bmName
->
let
benchmarkMap
=
zip
enabledNames
enabledBenchmarks
enabledNames
=
map
PD
.
benchmarkName
enabledBenchmarks
allNames
=
map
PD
.
benchmarkName
pkgBenchmarks
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment