lang/haskell: fail gracefully if stack isn't installed
This commit is contained in:
parent
871883cd89
commit
0ccdc065f9
2 changed files with 13 additions and 1 deletions
10
modules/lang/haskell/autoload.el
Normal file
10
modules/lang/haskell/autoload.el
Normal file
|
@ -0,0 +1,10 @@
|
|||
;;; lang/haskell/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +haskell|init-intero ()
|
||||
"Initializes `intero-mode' in haskell-mode, unless stack isn't installed.
|
||||
This is necessary because `intero-mode' doesn't do its own error checks."
|
||||
(when (derived-mode-p 'haskell-mode)
|
||||
(if (executable-find "stack")
|
||||
(intero-mode +1)
|
||||
(message "Couldn't find stack. Refusing to enable intero-mode."))))
|
Loading…
Add table
Add a link
Reference in a new issue