From ee5ac81dfcd8856ca64c6a6aa65c6e47a3214da9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 4 Dec 2018 10:31:53 +0100 Subject: [PATCH] Make GF compile with GHC 8.6.2 - Re-implement `Distribution.Simple.BuildPaths.exeExtension` - Turn off `MonadFailDesugaring` Tested with GHC: - 7.10.3 - 8.0.2 - 8.2.2 - 8.4.3 - 8.6.2 Yay Stack! --- Setup.hs | 5 +++++ gf.cabal | 1 + 2 files changed, 6 insertions(+) diff --git a/Setup.hs b/Setup.hs index 505eb9813..27524dbe5 100644 --- a/Setup.hs +++ b/Setup.hs @@ -1,3 +1,4 @@ +import Distribution.System(Platform(..),OS(..)) import Distribution.Simple(defaultMainWithHooks,UserHooks(..),simpleUserHooks) import Distribution.Simple.LocalBuildInfo(LocalBuildInfo(..),absoluteInstallDirs,datadir) import Distribution.Simple.Setup(BuildFlags(..),Flag(..),InstallFlags(..),CopyDest(..),CopyFlags(..),SDistFlags(..)) @@ -73,5 +74,9 @@ dataDirFile = "DATA_DIR" default_gf :: LocalBuildInfo -> FilePath default_gf lbi = buildDir lbi exeName' exeNameReal where + -- shadows Distribution.Simple.BuildPaths.exeExtension, which changed type signature in Cabal 2.4 + exeExtension = case hostPlatform lbi of + Platform arch Windows -> "exe" + _ -> "" exeName' = "gf" exeNameReal = exeName' <.> exeExtension diff --git a/gf.cabal b/gf.cabal index 4ec02950c..28aa82f99 100644 --- a/gf.cabal +++ b/gf.cabal @@ -98,6 +98,7 @@ Library -- ghc-options: +RTS -A20M -RTS ghc-prof-options: -fprof-auto extensions: + NoMonadFailDesugaring exposed-modules: PGF