diff options
| author | Andreas Källberg <anka.213@gmail.com> | 2021-06-16 14:27:19 +0800 |
|---|---|---|
| committer | Andreas Källberg <anka.213@gmail.com> | 2021-06-16 14:27:19 +0800 |
| commit | f505d88a8e9e664c90acc98a9cf9ec7d68a1f4f4 (patch) | |
| tree | 9b9cd9df65796b496e67625797d5e1d8a8b15d34 /testsuite | |
| parent | b1ed63b089cbe0ba8530475ff6a1b2582de37d7e (diff) | |
Fix build of test suite on ghc-8.2.2
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/run.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/testsuite/run.hs b/testsuite/run.hs index 7f377af79..ed013ab0f 100644 --- a/testsuite/run.hs +++ b/testsuite/run.hs @@ -1,7 +1,7 @@ import Data.List(partition) import System.IO import Distribution.Simple.BuildPaths(exeExtension) -import Distribution.System ( buildPlatform ) +import Distribution.System ( buildPlatform, OS (Windows), Platform (Platform) ) import System.Process(readProcess) import System.Directory(doesFileExist,getDirectoryContents) import System.FilePath((</>),(<.>),takeExtension) @@ -73,7 +73,12 @@ main = -- Should consult the Cabal configuration! run_gf = readProcess default_gf -default_gf = "gf"<.>exeExtension buildPlatform +default_gf = "gf"<.>exeExtension + where + -- shadows Distribution.Simple.BuildPaths.exeExtension, which changed type signature in Cabal 2.4 + exeExtension = case buildPlatform of + Platform arch Windows -> "exe" + _ -> "" -- | List files, excluding "." and ".." ls path = filter (`notElem` [".",".."]) `fmap` getDirectoryContents path |
