repl: Return stack traces along with exceptions.
authorLudovic Courtès <ludo@gnu.org>
Sun, 15 Mar 2020 16:22:30 +0000 (17:22 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 19 Mar 2020 14:14:08 +0000 (15:14 +0100)
commit2b0a370d00e72aba7385eba0fa5db2e3ca7085fb
treef331fa9246b6c2dba55e16fd6fc421cbb2d3952b
parentec0a8661728f915c21058076327b398ac5c38bbe
repl: Return stack traces along with exceptions.

* guix/repl.scm (repl-prompt): New variable.
(stack->frames): New procedure.
(send-repl-response)[frame->sexp, handle-exception]: New procedure.
Pass HANDLE-EXCEPTION as a pre-unwind handler.
(machine-repl): Define 'tag'.  Bump protocol version to (0 1 1).
Wrap 'loop' call in 'call-with-prompt'.
guix/repl.scm