Commit 82f63b8a authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Simplify configure code by relying on ghc >= 6.4

We changed to require ghc >= 6.4 a while ago, this is just a simplification
that was missed at the time.
parent a8769407
...@@ -248,12 +248,9 @@ configure (pkg_descr0, pbi) cfg ...@@ -248,12 +248,9 @@ configure (pkg_descr0, pbi) cfg
(map InstalledPackageInfo.package) mipkgs (map InstalledPackageInfo.package) mipkgs
dep_pkgs <- case flavor of dep_pkgs <- case flavor of
GHC | version >= Version [6,3] [] -> do GHC -> mapM (configDependency verbosity ipkgs) (buildDepends pkg_descr)
mapM (configDependency verbosity ipkgs) (buildDepends pkg_descr) JHC -> mapM (configDependency verbosity ipkgs) (buildDepends pkg_descr)
JHC -> do _ -> return $ map setDepByVersion (buildDepends pkg_descr)
mapM (configDependency verbosity ipkgs) (buildDepends pkg_descr)
_ -> do
return $ map setDepByVersion (buildDepends pkg_descr)
removeInstalledConfig removeInstalledConfig
...@@ -383,8 +380,7 @@ getInstalledPackages :: Verbosity -> Compiler -> PackageDB -> ProgramConfigurati ...@@ -383,8 +380,7 @@ getInstalledPackages :: Verbosity -> Compiler -> PackageDB -> ProgramConfigurati
getInstalledPackages verbosity comp packageDb progconf = do getInstalledPackages verbosity comp packageDb progconf = do
info verbosity "Reading installed packages..." info verbosity "Reading installed packages..."
case compilerFlavor comp of case compilerFlavor comp of
GHC | compilerVersion comp >= Version [6,3] [] GHC -> Just `fmap` GHC.getInstalledPackages verbosity packageDb progconf
-> Just `fmap` GHC.getInstalledPackages verbosity packageDb progconf
JHC -> Just `fmap` JHC.getInstalledPackages verbosity packageDb progconf JHC -> Just `fmap` JHC.getInstalledPackages verbosity packageDb progconf
_ -> return Nothing _ -> return Nothing
......
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