2018-07-14 21:43:12 +02:00
|
|
|
;;; lang/haskell/autoload.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;;;###autoload
|
2019-02-18 01:56:38 -05:00
|
|
|
(defun +haskell/open-repl (&optional arg)
|
2018-07-14 21:43:12 +02:00
|
|
|
"Opens a Haskell REPL."
|
|
|
|
(interactive "P")
|
2019-04-02 18:21:34 -04:00
|
|
|
(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")))
|
2020-01-11 00:42:18 +01:00
|
|
|
|
|
|
|
;;;###autoload
|
2020-01-11 01:08:28 +01:00
|
|
|
(defun +haskell/evil-open-above ()
|
2020-01-11 00:42:18 +01:00
|
|
|
"Opens a line above the current mode"
|
|
|
|
(interactive)
|
|
|
|
(evil-digit-argument-or-evil-beginning-of-line)
|
|
|
|
(haskell-indentation-newline-and-indent)
|
|
|
|
(evil-previous-line)
|
|
|
|
(haskell-indentation-indent-line)
|
|
|
|
(evil-append-line nil))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +haskell/evil-open-below ()
|
|
|
|
"Opens a line below the current mode"
|
|
|
|
(interactive)
|
|
|
|
(evil-append-line nil)
|
|
|
|
(haskell-indentation-newline-and-indent))
|