doomemacs/modules/lang/haskell/config.el
2017-03-16 17:22:13 -04:00

29 lines
849 B
EmacsLisp

;;; module-haskell.el
;; Requires cabal installed for syntax-checking, and ghci (or hugs) to be
;; installed for REPL support.
(def-package! haskell-mode
:mode (("\\.hs$" . haskell-mode)
("\\.ghci$" . ghci-script-mode)
("\\.cabal$" . haskell-cabal-mode))
:interpreter (("runghc" . haskell-mode)
("runhaskell" . haskell-mode))
:config
(load "haskell-mode-autoloads" nil t)
(set! :popup "*debug:haskell*" :size 20)
(set! :repl 'haskell-mode 'switch-to-haskell)
(push ".hi" completion-ignored-extensions)
(autoload 'switch-to-haskell "inf-haskell" nil t)
(after! inf-haskell
(map! :map inf-haskell-mode-map "ESC ESC" 'doom/popup-close)))
(def-package! dante
:after haskell-mode
:config
(when (executable-find "cabal")
(add-hook! 'haskell-mode-hook '(flycheck-mode dante-mode))))