lang/haskell: fix +haskell/open-repl

REPL handlers must return a buffer but display-buffer returns a window.
This commit is contained in:
Henrik Lissner 2019-04-02 18:21:34 -04:00
parent 2c81ee4d98
commit a49a9fee3a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -4,7 +4,11 @@
(defun +haskell/open-repl (&optional arg) (defun +haskell/open-repl (&optional arg)
"Opens a Haskell REPL." "Opens a Haskell REPL."
(interactive "P") (interactive "P")
(display-buffer (if-let*
(if (featurep! +intero) ((window
(intero-repl-buffer arg) (display-buffer
(haskell-session-interactive-buffer (haskell-session))))) (if (featurep! +intero)
(intero-repl-buffer arg)
(haskell-session-interactive-buffer (haskell-session))))))
(window-buffer window)
(error "Failed to display Haskell REPL")))