aboutsummaryrefslogtreecommitdiff
path: root/guix/monad-repl.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-01-13 17:50:17 +0100
committerLudovic Courtès <ludo@gnu.org>2016-01-13 18:18:48 +0100
commit8c986ab12034d67db836a881f57c69754d8073ae (patch)
treebf5183011119695ac549d4cfff4dc2175e659397 /guix/monad-repl.scm
parent203795aceaabec0e0e5818e1650ad407d825d1b3 (diff)
parent7a2eed3aac1ecd0bdf293e33a234fad58f2e5f9e (diff)
downloadgnu-guix-8c986ab12034d67db836a881f57c69754d8073ae.tar
gnu-guix-8c986ab12034d67db836a881f57c69754d8073ae.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/monad-repl.scm')
-rw-r--r--guix/monad-repl.scm22
1 files changed, 11 insertions, 11 deletions
diff --git a/guix/monad-repl.scm b/guix/monad-repl.scm
index ebd9151065..aefabdeebb 100644
--- a/guix/monad-repl.scm
+++ b/guix/monad-repl.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -60,11 +60,10 @@
"Return the derivation of the default "
(package-derivation store (default-guile) system))
-(define (store-monad-language)
- "Return a compiler language for the store monad."
- (let* ((store (open-connection))
- (guile (or (%guile-for-build)
- (default-guile-derivation store))))
+(define (store-monad-language store)
+ "Return a compiler language for the store monad using STORE."
+ (let ((guile (or (%guile-for-build)
+ (default-guile-derivation store))))
(monad-language %store-monad
(cut run-with-store store <>
#:guile-for-build guile)
@@ -84,10 +83,11 @@ Run EXP through the store monad."
(define-meta-command ((enter-store-monad guix) repl)
"enter-store-monad
Enter a REPL for values in the store monad."
- (let ((new (make-repl (store-monad-language))))
- ;; Force interpretation so that our specially-crafted language evaluator
- ;; is actually used.
- (repl-option-set! new 'interp #t)
- (run-repl new)))
+ (with-store store
+ (let ((new (make-repl (store-monad-language store))))
+ ;; Force interpretation so that our specially-crafted language evaluator
+ ;; is actually used.
+ (repl-option-set! new 'interp #t)
+ (run-repl new))))
;;; monad-repl.scm ends here