Skip to content

Commit

Permalink
Extend s-b-i information in Cabal
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Jul 27, 2021
1 parent f138e48 commit 188862a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Cabal/src/Distribution/Simple/ShowBuildInfo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,26 @@ mkComponentInfo wdir pkg_descr lbi clbi = JsonObject $
modules = case comp of
CLib lib -> explicitLibModules lib
CExe exe -> exeModules exe
_ -> []
CTest test ->
case testInterface test of
TestSuiteExeV10 _ _ -> []
TestSuiteLibV09 _ modName -> [modName]
TestSuiteUnsupported _ -> []
CBench bench -> benchmarkModules bench
CFLib flib -> foreignLibModules flib
sourceFiles = case comp of
CLib _ -> []
CExe exe -> [modulePath exe]
_ -> []
CTest test ->
case testInterface test of
TestSuiteExeV10 _ fp -> [fp]
TestSuiteLibV09 _ _ -> []
TestSuiteUnsupported _ -> []
CBench bench -> case benchmarkInterface bench of
BenchmarkExeV10 _ fp -> [fp]
BenchmarkUnsupported _ -> []

CFLib _ -> []
cabalFile
| Just fp <- pkgDescrFile lbi = [("cabal-file", JsonString (T.pack fp))]
| otherwise = []
Expand Down

0 comments on commit 188862a

Please sign in to comment.