Skip to content

Commit ad3ff49

Browse files
committed
Merge pull request #1298 from fice-t/repl
Simplify haskell-interactive-handle-expr
2 parents 8c9d2bc + 9d1c7d0 commit ad3ff49

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

haskell-repl.el

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222

2323
(defun haskell-interactive-handle-expr ()
2424
"Handle an inputted expression at the REPL."
25-
(let ((expr (haskell-interactive-mode-input))
26-
(at-prompt-line (>= (line-end-position)
27-
haskell-interactive-mode-prompt-start)))
28-
(if (and at-prompt-line
29-
(string= "" (replace-regexp-in-string " " "" expr)))
25+
(let ((expr (haskell-interactive-mode-input)))
26+
(if (string= "" (replace-regexp-in-string " " "" expr))
27+
;; Just make a new prompt on space-only input
3028
(progn
31-
(goto-char (point-max))
32-
(insert "\n")
33-
(haskell-interactive-mode-prompt))
29+
(goto-char (point-max))
30+
(insert "\n")
31+
(haskell-interactive-mode-prompt))
3432
(when (haskell-interactive-at-prompt)
3533
(cond
3634
;; If already evaluating, then the user is trying to send

0 commit comments

Comments
 (0)