Interface to NREPL server mainly enabling Clojupyter to evaluate Clojure code entered into Jupyter code cells, but supporting code completion, access to documentation strings, and interrupting currently running evaluations.
Interface to NREPL server mainly enabling Clojupyter to evaluate Clojure code entered into Jupyter code cells, but supporting code completion, access to documentation strings, and interrupting currently running evaluations.
(messages-result get-stacktrace-fn pending-input? msg-seq)
Build eval result by reducing the lazy sequence msgs
. Care must be taken to avoid reading past
the final message from the NREPL server as the read will then block indefinitely. Message reading
stops either when we get to the final message of the repl (:status
one of "done", "error" or
"interrupted") or the NREPL server indicates it needs input from the user (:status
equals
"need-input").
Build eval result by reducing the lazy sequence `msgs`. Care must be taken to avoid reading past the final message from the NREPL server as the read will then block indefinitely. Message reading stops either when we get to the final message of the repl (`:status` one of "done", "error" or "interrupted") or the NREPL server indicates it needs input from the user (`:status` equals "need-input").
(nrepl-complete cljsrv code)
(nrepl-continue-eval cljsrv msgseq)
Continues evaluating previously submitted nrepl-eval
which has been suspended due to need for
input. msgseq
must be a yet-to-be realized seq returned from nrepl/message
from the
continuing evaluation proceeds. Return value is identical to that of nrepl-eval
.
Continues evaluating previously submitted `nrepl-eval` which has been suspended due to need for input. `msgseq` must be a yet-to-be realized seq returned from `nrepl/message` from the continuing evaluation proceeds. Return value is identical to that of `nrepl-eval`.
(nrepl-doc cljsrv sym)
(nrepl-eval cljsrv code)
Evaluates code
and returns a result map containing the generated NREPL messages under key
:nrepl-messages
and a stacktrace under key :stacktrace
iff an error occurred during
evaluation. If Clojure needs input from stdin
the key :need-input
is associated with true
in
which case provide-input
must be used to provide the input obtained from the user. nrepl-eval
cannot be called again until the needed input has been provided.
Evaluates `code` and returns a result map containing the generated NREPL messages under key `:nrepl-messages` and a stacktrace under key `:stacktrace` iff an error occurred during evaluation. If Clojure needs input from `stdin` the key `:need-input` is associated with `true` in which case `provide-input` must be used to provide the input obtained from the user. `nrepl-eval` cannot be called again until the needed input has been provided.
(nrepl-interrupt cljsrv)
(nrepl-provide-input cljsrv input-string)
Sends input-string
to Clojure to satisfy requested need from stdin
. Returns input-string
.
Sends `input-string` to Clojure to satisfy requested need from `stdin`. Returns `input-string`.
(nrepl-server-addr cljsrv)
(nrepl-trace cljsrv)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close