doomemacs/modules/lang/haskell/autoload.el
Henrik Lissner a49a9fee3a
lang/haskell: fix +haskell/open-repl
REPL handlers must return a buffer but display-buffer returns a window.
2019-04-02 18:21:34 -04:00

15 lines
428 B
EmacsLisp

;;; lang/haskell/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +haskell/open-repl (&optional arg)
"Opens a Haskell REPL."
(interactive "P")
(if-let*
((window
(display-buffer
(if (featurep! +intero)
(intero-repl-buffer arg)
(haskell-session-interactive-buffer (haskell-session))))))
(window-buffer window)
(error "Failed to display Haskell REPL")))