guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: derivations: Micro-optimize 'write-derivation'.


From: Ludovic Courtès
Subject: 01/03: derivations: Micro-optimize 'write-derivation'.
Date: Thu, 5 Jan 2017 22:46:41 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 6d943e553d45280ec54f067a3e5e7f714fcd9ba1
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jan 5 21:49:45 2017 +0100

    derivations: Micro-optimize 'write-derivation'.
    
    * guix/derivations.scm (write-derivation)[write-input]: Use 'display'
    instead of 'write' for PATH.
    Use 'simple-format' instead of 'format', and '~a' instead of '~s' for
    SYSTEM and BUILDER.
---
 guix/derivations.scm |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/guix/derivations.scm b/guix/derivations.scm
index 7ed9bd6..23ad58f 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès 
<address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -520,9 +520,9 @@ that form."
   (define (write-input input port)
     (match input
       (($ <derivation-input> path sub-drvs)
-       (display "(" port)
-       (write path port)
-       (display "," port)
+       (display "(\"" port)
+       (display path port)
+       (display "\"," port)
        (write-string-list sub-drvs)
        (display ")" port))))
 
@@ -545,7 +545,7 @@ that form."
      (write-list inputs write-input port)
      (display "," port)
      (write-string-list sources)
-     (format port ",~s,~s," system builder)
+     (simple-format port ",\"~a\",\"~a\"," system builder)
      (write-string-list args)
      (display "," port)
      (write-list env-vars write-env-var port)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]