Commit 34b8afa4 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Version test for Backpack support.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 33cc3ebb
......@@ -59,6 +59,7 @@ module Distribution.Simple.Compiler (
unitIdSupported,
coverageSupported,
profilingSupported,
backpackSupported,
-- * Support for profiling detail levels
ProfDetailLevel(..),
......@@ -316,6 +317,10 @@ packageKeySupported = ghcSupported "Uses package keys"
unitIdSupported :: Compiler -> Bool
unitIdSupported = ghcSupported "Uses unit IDs"
-- | Does this compiler support Backpack?
backpackSupported :: Compiler -> Bool
backpackSupported = ghcSupported "Support Backpack"
-- | Does this compiler support Haskell program coverage?
coverageSupported :: Compiler -> Bool
coverageSupported comp =
......
......@@ -954,13 +954,18 @@ checkCompilerProblems comp pkg_descr enabled = do
all (all (isDefaultIncludeRenaming . snd) . backpackIncludes)
(enabledBuildInfos pkg_descr enabled)) $
die $ "Your compiler does not support thinning and renaming on "
++ "package flags. To use this feature you probably must use "
++ "package flags. To use this feature you must use "
++ "GHC 7.9 or later."
when (any (not.null.PD.reexportedModules) (PD.allLibraries pkg_descr)
&& not (reexportedModulesSupported comp)) $ do
die $ "Your compiler does not support module re-exports. To use "
++ "this feature you probably must use GHC 7.9 or later."
++ "this feature you must use GHC 7.9 or later."
when (any (not.null.PD.signatures) (PD.allLibraries pkg_descr)
&& not (backpackSupported comp)) $ do
die $ "Your compiler does not support Backpack. To use "
++ "this feature you must use GHC 8.1 or later."
-- | Select dependencies for the package.
configureDependencies
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment