(require-package 'haskell-mode)

(dolist (hook '(haskell-mode-hook inferior-haskell-mode-hook))
  (add-hook hook 'turn-on-haskell-doc-mode))

(add-auto-mode 'haskell-mode "\\.ghci\\'")

(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook (lambda () (subword-mode +1)))

(after-load 'haskell-mode
  (define-key haskell-mode-map (kbd "C-c h") 'hoogle))

(when (eval-when-compile (>= emacs-major-version 24))
  (require-package 'ghci-completion)
  (add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion))


;; Make compilation-mode understand "at blah.hs:11:34-50" lines output by GHC
(after-load 'compile
  (let ((alias 'ghc-at-regexp))
    (add-to-list
     'compilation-error-regexp-alist-alist
     (list alias " at \\(.*\\.\\(?:l?[gh]hs\\|hi\\)\\):\\([0-9]+\\):\\([0-9]+\\)-[0-9]+$" 1 2 3 0 1))
    (add-to-list
     'compilation-error-regexp-alist alias)))

(provide 'init-haskell)

(require-package 'haskell-mode)

(dolist (hook '(haskell-mode-hook inferior-haskell-mode-hook))
  (add-hook hook 'turn-on-haskell-doc-mode))

(add-auto-mode 'haskell-mode "\\.ghci\\'")

(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook (lambda () (subword-mode +1)))

(after-load 'haskell-mode
  (define-key haskell-mode-map (kbd "C-c h") 'hoogle))

(when (eval-when-compile (>= emacs-major-version 24))
  (require-package 'ghci-completion)
  (add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion))

(eval-after-load 'page-break-lines
  '(push 'haskell-mode page-break-lines-modes))

;; Make compilation-mode understand "at blah.hs:11:34-50" lines output by GHC
(after-load 'compile
  (let ((alias 'ghc-at-regexp))
    (add-to-list
     'compilation-error-regexp-alist-alist
     (list alias " at \\(.*\\.\\(?:l?[gh]hs\\|hi\\)\\):\\([0-9]+\\):\\([0-9]+\\)-[0-9]+$" 1 2 3 0 1))
    (add-to-list
     'compilation-error-regexp-alist alias)))

(provide 'init-haskell)

Enable page-break-lines-mode in haskell buffers
Enable page-break-lines-mode in haskell buffers

kindoblue/emacs.d,bibaijin/emacs.d,farzadbekran/emacs.d,jkaessens/emacs.d,farzadbekran/emacs.d,gsmlg/emacs.d,cyjia/emacs.d,purcell/emacs.d,dcorking/emacs.d,carlosliu/emacs.d,jhpx/emacs.d,baohaojun/emacs.d,benkha/emacs.d,farzadbekran/emacs.d,hophacker/emacs.d,farzadbekran/emacs.d,cjqw/emacs.d,renatoriccio/emacs.d,me020523/emacs.d,lust4life/emacs.d,Togal/emacs.d,shafayetkhan/emacs.d,whizzzkid/emacs.d,blueabysm/emacs.d,ilove0518/emacs.d,Werewolflsp/emacs.d,boblannon/emacs.d,jachinpy/emacs.d,scorpionis/emacs.d,ruiyang/emacs.d,dongdonghu/.emacs.d,46do14/emacs.d,dhanunjaya/emacs.d,LKI/emacs.d,Jadecity/PurcellEmacs.d,svenyurgensson/emacs.d,arthurl/emacs.d,braveoyster/emacs.d,zhuoyikang/emacs.d,mmqmzk/emacs.d,Guoozz/emacs.d,hkcqr/emacs.d,DarkThrone/emacs.d,farzadbekran/emacs.d,caoyuanqi/emacs.d,jthetzel/emacs.d,modkzs/emcs.d,danfengcao/emacs.d,fengxl/emacs.d,jachinpy/emacs.d,LittleLmp/emacs.d,wegatron/emacs.d,Enzo-Liu/emacs.d,sgarciac/emacs.d,wenpincui/emacs.d,atreeyang/emacs.d,pairyo/emacs.d,mpwang/emacs.d,ernest-dzf/emacs.d,Shanicky/emacs.d,zenith-john/emacs.d,qinshulei/emacs.d,haodaivshen/emacs.d,exclamaforte/emacs.d,qianwan/emacs.d,lujianmei/emacs.d,roxolan/emacs.d,zhaotai/.emacs.d,ruiyang/emacs.d,alant/emacs.d,lromang/emacs.d,emuio/emacs.d,kongfy/emacs.d,krzysz00/emacs.d,blueseason/emacs.d