[commit: ghc] wip/nfs-locking: Add putSuccess helper function. (a6623ab)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:03:12 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/a6623ab5988c2705b22e8a5157db013595f634ce/ghc

>---------------------------------------------------------------

commit a6623ab5988c2705b22e8a5157db013595f634ce
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri Aug 7 02:56:33 2015 +0100

    Add putSuccess helper function.


>---------------------------------------------------------------

a6623ab5988c2705b22e8a5157db013595f634ce
 src/Util.hs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/Util.hs b/src/Util.hs
index 1c34a87..7a68b2a 100644
--- a/src/Util.hs
+++ b/src/Util.hs
@@ -4,7 +4,7 @@ module Util (
     replaceIf, replaceEq, replaceSeparators, decodeModule,
     unifyPath, (-/-),
     chunksOfSize,
-    putColoured, putOracle, putBuild, putError,
+    putColoured, putOracle, putBuild, putSuccess, putError,
     bimap, minusOrd, intersectOrd
     ) where
 
@@ -69,6 +69,12 @@ putBuild :: String -> Action ()
 putBuild = putColoured White
 
 -- A more colourful version of error
+putSuccess :: String -> Action a
+putSuccess msg = do
+    putColoured Green msg
+    error $ "GHC build system error: " ++ msg
+
+-- A more colourful version of error
 putError :: String -> Action a
 putError msg = do
     putColoured Red msg



More information about the ghc-commits mailing list