Function: haskell-utils-repl-response-error-status
haskell-utils-repl-response-error-status is a natively compiled
function defined in haskell-utils.el.
Signature
(haskell-utils-repl-response-error-status RESPONSE)
Documentation
Parse response REPL's RESPONSE for errors.
Returns one of the following symbols:
+ unknown-command
+ option-missing
+ interactive-error
+ no-error
*Warning*: this function covers only three kind of responses:
* "unknown command …"
REPL missing requested command
* "<interactive>:3:5: …"
interactive REPL error
* "Couldn\\='t guess that module name. Does it exist?"
(:type-at and maybe some other commands error)
* *all other reposnses* are treated as success reposneses and
'no-error is returned.
Source Code
;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-utils.el
(defun haskell-utils-repl-response-error-status (response)
"Parse response REPL\\='s RESPONSE for errors.
Returns one of the following symbols:
+ unknown-command
+ option-missing
+ interactive-error
+ no-error
*Warning*: this function covers only three kind of responses:
* \"unknown command …\"
REPL missing requested command
* \"<interactive>:3:5: …\"
interactive REPL error
* \"Couldn\\='t guess that module name. Does it exist?\"
(:type-at and maybe some other commands error)
* *all other reposnses* are treated as success reposneses and
\\='no-error is returned."
(if response
(let ((first-line (car (split-string response "\n" t))))
(cond
((null first-line) 'no-error)
((string-match-p "^unknown command" first-line)
'unknown-command)
((string-match-p
"^Couldn't guess that module name. Does it exist?"
first-line)
'option-missing)
((string-match-p "^<interactive>:" first-line)
'interactive-error)
(t 'no-error)))
;; in case of nil-ish response it's not clear is it error response or not
'no-error))