[commit: packages/Cabal] ghc-head: Rearrange the code a bit. (d9283d2)
git at git.haskell.org
git at git.haskell.org
Thu Aug 29 10:12:04 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=d9283d291a98b7971836a2a476f3210ed345a479
>---------------------------------------------------------------
commit d9283d291a98b7971836a2a476f3210ed345a479
Author: Mikhail Glushenkov <mikhail.glushenkov at gmail.com>
Date: Mon Aug 26 20:19:51 2013 +0200
Rearrange the code a bit.
>---------------------------------------------------------------
d9283d291a98b7971836a2a476f3210ed345a479
Cabal/Distribution/Simple/GHC.hs | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/Cabal/Distribution/Simple/GHC.hs b/Cabal/Distribution/Simple/GHC.hs
index c6c12dd..a86122b 100644
--- a/Cabal/Distribution/Simple/GHC.hs
+++ b/Cabal/Distribution/Simple/GHC.hs
@@ -142,21 +142,6 @@ import System.Environment (getEnv)
import Distribution.Compat.Exception (catchExit, catchIO)
import Distribution.System (Platform, platformFromTriple)
-getGhcInfo :: Verbosity -> ConfiguredProgram -> IO [(String, String)]
-getGhcInfo verbosity ghcProg =
- case programVersion ghcProg of
- Just ghcVersion
- | ghcVersion >= Version [6,7] [] ->
- do xs <- getProgramOutput verbosity (suppressOverrideArgs ghcProg)
- ["--info"]
- case reads xs of
- [(i, ss)]
- | all isSpace ss ->
- return i
- _ ->
- die "Can't parse --info output of GHC"
- _ ->
- return []
-- -----------------------------------------------------------------------------
-- Configuring
@@ -402,6 +387,22 @@ getLanguages _ ghcProg
where
Just ghcVersion = programVersion ghcProg
+getGhcInfo :: Verbosity -> ConfiguredProgram -> IO [(String, String)]
+getGhcInfo verbosity ghcProg =
+ case programVersion ghcProg of
+ Just ghcVersion
+ | ghcVersion >= Version [6,7] [] ->
+ do xs <- getProgramOutput verbosity (suppressOverrideArgs ghcProg)
+ ["--info"]
+ case reads xs of
+ [(i, ss)]
+ | all isSpace ss ->
+ return i
+ _ ->
+ die "Can't parse --info output of GHC"
+ _ ->
+ return []
+
getExtensions :: Verbosity -> ConfiguredProgram -> IO [(Extension, Flag)]
getExtensions verbosity ghcProg
| ghcVersion >= Version [6,7] [] = do
More information about the ghc-commits
mailing list