Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…v ghci'
  • Loading branch information...
commit 3597d608fc60e0c46ca32e2d1e96e96c4b3420f3 1 parent 81fb932
@dagit dagit authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/FakeGhc.hs
View
10 src/FakeGhc.hs
@@ -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"] []
+
Please sign in to comment.
Something went wrong with that request. Please try again.