forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-haskell.el
29 lines (22 loc) · 950 Bytes
/
init-haskell.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(require-package 'haskell-mode)
(dolist (hook '(haskell-mode-hook inferior-haskell-mode-hook))
(add-hook hook 'turn-on-haskell-doc-mode))
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(eval-after-load 'haskell-mode
'(progn
(define-key haskell-mode-map (kbd "C-c h") 'hoogle)
(define-key haskell-mode-map (kbd "RET") 'newline)))
(require-package 'ghci-completion)
(add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion)
(require-package 'flymake-haskell-multi)
(add-hook 'haskell-mode-hook #'flymake-haskell-multi-load)
;; Make compilation-mode understand "at blah.hs:11:34-50" lines output by GHC
(eval-after-load 'compile
'(progn
(let ((alias 'ghc-at-regexp))
(add-to-list
'compilation-error-regexp-alist-alist
(list alias " at \\(.*l?hs\\):\\([0-9]+\\):\\([0-9]+\\)-[0-9]+$" 1 2 3 0 1))
(add-to-list
'compilation-error-regexp-alist alias))))
(provide 'init-haskell)