diff options
author | Ian Lynagh <igloo@earth.li> | 2010-11-21 18:35:20 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-11-21 18:35:20 +0000 |
commit | 6bb8d64a971afce310df3349e8767b790c2845ee (patch) | |
tree | 2c84c646d1dbafc482c4232e1be9ebfa3c2bd9b0 /utils/ghc-pwd/Main.hs | |
parent | 0d348bceca43eaac089d3e5e77dcaa0110a94fe2 (diff) | |
download | haskell-6bb8d64a971afce310df3349e8767b790c2845ee.tar.gz |
For bindists, build ghc-pwd with stage 1
rather then the bootstrapping compiler. This fixes problems where the
bootstrapping compiler dynamically links against libraries not on the
target machine.
Diffstat (limited to 'utils/ghc-pwd/Main.hs')
-rw-r--r-- | utils/ghc-pwd/Main.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/ghc-pwd/Main.hs b/utils/ghc-pwd/Main.hs new file mode 100644 index 0000000000..91a5606ac3 --- /dev/null +++ b/utils/ghc-pwd/Main.hs @@ -0,0 +1,22 @@ + +module Main where + +import System.Directory +import System.Environment +import System.Exit +import System.IO + +main :: IO () +main = do + args <- getArgs + case args of + [] -> do d <- getCurrentDirectory + putStr $ map forwardifySlashes d + _ -> do hPutStrLn stderr ("Bad args: " ++ show args) + hPutStrLn stderr "Usage: ghc-pwd" + exitFailure + +forwardifySlashes :: Char -> Char +forwardifySlashes '\\' = '/' +forwardifySlashes c = c + |