Permalink
Browse files

FakeGhc: pass --numeric-version on to ghc. Fixes a bug with 'cabal-de…

…v ghci'
  • Loading branch information...
1 parent 81fb932 commit 3597d608fc60e0c46ca32e2d1e96e96c4b3420f3 @dagit dagit committed Oct 27, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/FakeGhc.hs
View
@@ -9,8 +9,16 @@ module Main ( main ) where
import System.Environment ( getArgs )
import Distribution.Dev.GhcArgs ( formatGHCArgs )
+import System.Process ( readProcess )
-- |Take the command line arguments and format them in an
-- easily-parsed way.
main :: IO ()
-main = putStr . formatGHCArgs =<< getArgs
+main = do
+ args <- getArgs
+ case args of
+ "--numeric-version":_ -> putStr =<< ghc
+ _ -> putStr (formatGHCArgs args)
+ where
+ ghc = readProcess "ghc" ["--numeric-version"] []
+

0 comments on commit 3597d60

Please sign in to comment.