From f505d88a8e9e664c90acc98a9cf9ec7d68a1f4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= Date: Wed, 16 Jun 2021 14:27:19 +0800 Subject: [PATCH] Fix build of test suite on ghc-8.2.2 --- testsuite/run.hs | 9 +++++++-- 1 file 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