@@ -15,33 +15,36 @@ import Control.Monad
15
15
import Data.Attoparsec.Text
16
16
import Data.Char
17
17
import Data.Foldable (asum )
18
- import Data.Maybe (maybeToList , catMaybes )
18
+ import Data.Maybe (catMaybes ,
19
+ maybeToList )
19
20
import Data.Text (Text )
20
21
import qualified Data.Text as T
21
22
import Data.Text.Encoding (encodeUtf8 )
22
23
import Distribution.ModuleName (ModuleName ,
23
24
toFilePath )
24
25
import Distribution.Package (pkgName ,
25
26
unPackageName )
26
- import Distribution.PackageDescription (Benchmark (benchmarkBuildInfo , benchmarkName , benchmarkInterface ),
27
+ import Distribution.PackageDescription (Benchmark (benchmarkBuildInfo , benchmarkInterface , benchmarkName ),
28
+ BenchmarkInterface (BenchmarkExeV10 ),
27
29
Executable (buildInfo , exeName , modulePath ),
28
30
ForeignLib (foreignLibBuildInfo , foreignLibName ),
29
31
Library (libBuildInfo , libName ),
30
32
LibraryName (.. ),
33
+ TestSuiteInterface (TestSuiteExeV10 ),
31
34
benchmarkModules ,
32
35
exeModules ,
33
36
explicitLibModules ,
34
- foreignLibModules , TestSuiteInterface ( TestSuiteExeV10 ), BenchmarkInterface ( BenchmarkExeV10 ) )
37
+ foreignLibModules )
35
38
import Distribution.PackageDescription.Configuration
36
39
import Distribution.PackageDescription.Parsec
37
40
import Distribution.Types.BuildInfo
38
41
import Distribution.Types.PackageDescription
39
42
import Distribution.Types.TestSuite
40
43
import Distribution.Types.UnqualComponentName
41
44
import Distribution.Utils.Path (getSymbolicPath )
42
- import System.FilePath ( (</>) , (<.>) )
43
- import GHC.IO ( unsafePerformIO )
44
- import System.Directory ( doesFileExist )
45
+ import GHC.IO ( unsafePerformIO )
46
+ import System.Directory ( doesFileExist )
47
+ import System.FilePath ( (<.>) , (</>) )
45
48
46
49
47
50
type Name = Text
@@ -172,12 +175,12 @@ extractPackage PackageDescription{..} = Package n cc where
172
175
benchmarkExePath :: Benchmark -> [FilePath ]
173
176
benchmarkExePath b = case benchmarkInterface b of
174
177
BenchmarkExeV10 _ f -> [f]
175
- _ -> []
178
+ _ -> []
176
179
177
180
toFilePath' :: ModuleName -> [FilePath ]
178
181
toFilePath' mod = [ toFilePath mod <.> ext | ext <- [" hs" , " lhs" ]]
179
182
180
183
testExePath :: TestSuite -> [FilePath ]
181
184
testExePath t = case testInterface t of
182
185
TestSuiteExeV10 _ fp -> [fp]
183
- _ -> []
186
+ _ -> []
0 commit comments