lang/haskell: improve REPL support #752
This commit is contained in:
parent
e97fd7558c
commit
a76c080930
2 changed files with 16 additions and 1 deletions
15
modules/lang/haskell/autoload.el
Normal file
15
modules/lang/haskell/autoload.el
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
;;; lang/haskell/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +haskell-repl-buffer ()
|
||||||
|
"Returns the appropriate Haskell REPL buffer."
|
||||||
|
(if (featurep! +intero)
|
||||||
|
(intero-repl-buffer arg)
|
||||||
|
(haskell-session-interactive-buffer (haskell-session))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +haskell/repl (&optional arg)
|
||||||
|
"Opens a Haskell REPL."
|
||||||
|
(interactive "P")
|
||||||
|
(display-buffer (+haskell-repl-buffer)))
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
:hook (haskell-mode . hindent-mode))
|
:hook (haskell-mode . hindent-mode))
|
||||||
|
|
||||||
(after! haskell-mode
|
(after! haskell-mode
|
||||||
(set-repl-handler! 'haskell-mode #'switch-to-haskell)
|
(set-repl-handler! '(haskell-mode haskell-cabal-mode literate-haskell-mode) #'+haskell-repl-buffer)
|
||||||
(add-to-list 'completion-ignored-extensions ".hi"))
|
(add-to-list 'completion-ignored-extensions ".hi"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue