[commit: ghc] wip/nfs-locking: Unify paths when printing progress info (6adb600)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:23:24 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/6adb60093ae65970bbec17f9b24227b20f5a71f5/ghc
>---------------------------------------------------------------
commit 6adb60093ae65970bbec17f9b24227b20f5a71f5
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Mon Oct 3 18:22:23 2016 +0100
Unify paths when printing progress info
>---------------------------------------------------------------
6adb60093ae65970bbec17f9b24227b20f5a71f5
src/Rules/Actions.hs | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/Rules/Actions.hs b/src/Rules/Actions.hs
index cbca810..e30bc01 100644
--- a/src/Rules/Actions.hs
+++ b/src/Rules/Actions.hs
@@ -200,16 +200,15 @@ putProgressInfo :: String -> Action ()
putProgressInfo msg = when (cmdProgressInfo /= None) $ putBuild msg
-- | Render an action.
-renderAction :: String -> String -> String -> String
+renderAction :: String -> FilePath -> FilePath -> String
renderAction what input output = case cmdProgressInfo of
- Normal -> renderBox [ what
- , " input: " ++ input
- , " => output: " ++ output ]
- Brief -> "| " ++ what ++ ": " ++ input ++ " => " ++ output
- Unicorn -> renderUnicorn [ what
- , " input: " ++ input
- , " => output: " ++ output ]
+ Normal -> renderBox [ what, " input: " ++ i, " => output: " ++ o ]
+ Brief -> "| " ++ what ++ ": " ++ i ++ " => " ++ o
+ Unicorn -> renderUnicorn [ what, " input: " ++ i, " => output: " ++ o ]
None -> ""
+ where
+ i = unifyPath input
+ o = unifyPath output
-- | Render the successful build of a program
renderProgram :: String -> String -> String -> String
More information about the ghc-commits
mailing list