File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -970,5 +970,28 @@ execusion."
970
970
(remove-hook
971
971
'post-command-hook #'hs-utils/async-update-post-command-flag t )))
972
972
973
+ (defun hs-utils/parse-repl-response (r )
974
+ " Parse response R from REPL and return special kind of result.
975
+ The result is response string itself with speacial property
976
+ response-type added.
977
+
978
+ This property could be of the following:
979
+
980
+ + unknown-command
981
+ + option-missing
982
+ + interactive-error
983
+ + success"
984
+ (let ((first-line (car (split-string r " \n " ))))
985
+ (cond
986
+ ((string-match-p " ^unknown command" first-line) 'unknown-command )
987
+ ((string-match-p " ^Couldn't guess that module name. Does it exist?"
988
+ first-line)
989
+ 'option-missing )
990
+ ((string-match-p " ^<interactive>:" first-line) 'interactive-error )
991
+ (t 'success ))))
992
+
993
+
994
+
995
+
973
996
(provide 'haskell-commands )
974
997
; ;; haskell-commands.el ends here
You can’t perform that action at this time.
0 commit comments