summaryrefslogtreecommitdiff
path: root/guix/status.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-11 16:57:38 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-11 18:18:13 +0200
commit2569ef9dab4f796a75b8cdddd57d3be37b142036 (patch)
tree34b527c015552944c1a6fd1bb855dd45e36084bc /guix/status.scm
parentc1df77e215b6e69dccbe781307836a3b962c5968 (diff)
colors: Introduce a disjoint type and pre-compute ANSI escapes.
* guix/colors.scm (color-table, color): Remove. (<color>): New record type. (print-color): New procedure. (define-color-table, color): New macros. (color-codes->ansi): New procedure. (%reset): New variable. (colorize-string): Rewrite accordingly. (color-rules): Adjust accordingly. * guix/status.scm (print-build-event): Adjust to new 'colorize-string' interface. * guix/ui.scm (%highlight-argument): Likewise. (%warning-colors, %info-colors, %error-colors, %hint-colors) (%highlight-colors): Remove. (%warning-color, %info-color, %error-color, %hint-color) (%highlight-color): New variables.
Diffstat (limited to 'guix/status.scm')
-rw-r--r--guix/status.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/status.scm b/guix/status.scm
index 7edb558ee7..cbea4151f2 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -410,17 +410,17 @@ produce colorful output. When PRINT-LOG? is true, display the build log in
addition to build events."
(define info
(if colorize?
- (cut colorize-string <> 'BOLD)
+ (cute colorize-string <> (color BOLD))
identity))
(define success
(if colorize?
- (cut colorize-string <> 'GREEN 'BOLD)
+ (cute colorize-string <> (color GREEN BOLD))
identity))
(define failure
(if colorize?
- (cut colorize-string <> 'RED 'BOLD)
+ (cute colorize-string <> (color RED BOLD))
identity))
(define (report-build-progress phase %)