@@ -23,7 +23,7 @@ module Distribution.Client.Setup
23
23
, configureExCommand , ConfigExFlags (.. ), defaultConfigExFlags
24
24
, buildCommand , BuildFlags (.. ), BuildExFlags (.. ), SkipAddSourceDepsCheck (.. )
25
25
, filterTestFlags
26
- , replCommand , testCommand , benchmarkCommand , testOptions , benchmarkOptions
26
+ , replCommand , testCommand , showBuildInfoCommand , benchmarkCommand , testOptions , benchmarkOptions
27
27
, configureExOptions , reconfigureCommand
28
28
, installCommand , InstallFlags (.. ), installOptions , defaultInstallFlags
29
29
, filterHaddockArgs , filterHaddockFlags , haddockOptions
@@ -192,6 +192,7 @@ globalCommand commands = CommandUI {
192
192
, " outdated"
193
193
, " haddock"
194
194
, " hscolour"
195
+ , " show-build-info"
195
196
, " exec"
196
197
, " new-build"
197
198
, " new-configure"
@@ -278,6 +279,7 @@ globalCommand commands = CommandUI {
278
279
, addCmd " upload"
279
280
, addCmd " report"
280
281
, par
282
+ , addCmd " show-build-info"
281
283
, addCmd " freeze"
282
284
, addCmd " gen-bounds"
283
285
, addCmd " outdated"
@@ -861,6 +863,25 @@ filterTestFlags flags cabalLibVersion
861
863
Cabal. testWrapper = NoFlag
862
864
}
863
865
866
+ -- ------------------------------------------------------------
867
+ -- * show-build-info command
868
+ -- ------------------------------------------------------------
869
+
870
+ showBuildInfoCommand :: CommandUI (BuildFlags , BuildExFlags )
871
+ showBuildInfoCommand = parent {
872
+ commandDefaultFlags = (commandDefaultFlags parent, mempty ),
873
+ commandOptions =
874
+ \ showOrParseArgs -> liftOptions fst setFst
875
+ (commandOptions parent showOrParseArgs)
876
+ ++
877
+ liftOptions snd setSnd (buildExOptions showOrParseArgs)
878
+ }
879
+ where
880
+ setFst a (_,b) = (a,b)
881
+ setSnd b (a,_) = (a,b)
882
+
883
+ parent = Cabal. showBuildInfoCommand defaultProgramDb
884
+
864
885
-- ------------------------------------------------------------
865
886
-- * Repl command
866
887
-- ------------------------------------------------------------
0 commit comments