[commit: ghc] wip/nfs-locking: Add a paragraph on customising progress messages (2c77b71)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 01:01:48 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/2c77b7107ccf663598b9b64a22f3a4c5bc39b568/ghc
>---------------------------------------------------------------
commit 2c77b7107ccf663598b9b64a22f3a4c5bc39b568
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Tue May 17 23:55:16 2016 +0100
Add a paragraph on customising progress messages
See #244. [skip ci]
>---------------------------------------------------------------
2c77b7107ccf663598b9b64a22f3a4c5bc39b568
doc/user-settings.md | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/doc/user-settings.md b/doc/user-settings.md
index 4624e2d..1433ae9 100644
--- a/doc/user-settings.md
+++ b/doc/user-settings.md
@@ -144,3 +144,20 @@ splitObjects = (return cmdSplitObjects) &&^ defaultSplitObjects
buildHaddock :: Predicate
buildHaddock = return cmdBuildHaddock
```
+
+Hadrian prints various progress info during the build. You can customise how this
+info is printed by overriding `putBuild` and `putSuccess` commands:
+
+```haskell
+-- | Customise build progress messages (e.g. executing a build command).
+putBuild :: String -> Action ()
+putBuild = putColoured Vivid White
+
+-- | Customise build success messages (e.g. a package is built successfully).
+putSuccess :: String -> Action ()
+putSuccess = putColoured Vivid Green
+```
+
+You can tune colours for your favourite terminal and also change the verbosity
+level, e.g. by setting `putSuccess = putLoud`, which will hide success messages
+unless Hadrian is called with `--verbose` flag.
More information about the ghc-commits
mailing list