summaryrefslogtreecommitdiff
path: root/guix/repl.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/repl.scm')
-rw-r--r--guix/repl.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/repl.scm b/guix/repl.scm
index 0ace5976cf..94d85815ef 100644
--- a/guix/repl.scm
+++ b/guix/repl.scm
@@ -78,8 +78,14 @@ output port. VERSION is the client's protocol version we are targeting."
(let ((stack (if (repl-prompt)
(make-stack #t handle-exception (repl-prompt))
(make-stack #t))))
+ ;; Note: 'make-stack' returns #f if there's no 'handle-exception'
+ ;; stack frame, which is the case when this file is being
+ ;; interpreted as with 'primitive-load'.
`(exception (arguments ,key ,@(map value->sexp args))
- (stack ,@(map frame->sexp (stack->frames stack))))))
+ (stack ,@(map frame->sexp
+ (if stack
+ (stack->frames stack)
+ '()))))))
(_
;; Protocol (0 0).
`(exception ,key ,@(map value->sexp args)))))