aboutsummaryrefslogtreecommitdiff
path: root/tw/gexp.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tw/gexp.scm')
-rw-r--r--tw/gexp.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/tw/gexp.scm b/tw/gexp.scm
index 0770f250..49021ebd 100644
--- a/tw/gexp.scm
+++ b/tw/gexp.scm
@@ -22,9 +22,10 @@
'#$files)))))))
(define-public (json-file name value)
+ "A file called NAME containing the JSON-serialised VALUE."
(computed-file name
(with-extensions (list guile-json-4)
- #~(begin
- (use-modules (json) (srfi srfi-26))
- (call-with-output-file #$output
- (cut scm->json '#$value <> #:unicode #t))))))
+ #~(call-with-output-file #$output
+ (lambda (port)
+ (set-port-encoding! port "UTF-8")
+ ((@ (json) scm->json) '#$value port #:unicode #t))))))