;; switch to ERC with Ctrl+c e
(global-set-key (kbd "C-c e") 'start-erc) ;; ERC
-;; Haskell intero mode
-(add-hook 'haskell-mode-hook 'intero-mode)
-
;; ido
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(setq c-default-style "k&r"
c-basic-offset 4)
+;; haskell
+(add-hook 'haskell-mode-hook #'hindent-mode)
+
+(eval-after-load 'haskell-mode
+ '(define-key haskell-mode-map [f8] 'haskell-navigate-imports))
+
+;;; ghc-mod
+(let ((my-cabal-path (expand-file-name "~/.cabal/bin")))
+ (setenv "PATH" (concat my-cabal-path ":" (getenv "PATH")))
+ (add-to-list 'exec-path my-cabal-path))
+
+(autoload 'ghc-init "ghc" nil t)
+(autoload 'ghc-debug "ghc" nil t)
+(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
+
;; hlint
(add-to-list 'load-path "~/.emacs.d/hs-lint")
(require 'hs-lint)
(add-to-list 'which-func-modes '(c-mode c++-mode rust-mode haskell-mode))
;; flysheck
-(add-hook 'after-init-hook #'global-flycheck-mode)
+;; (add-hook 'after-init-hook #'global-flycheck-mode)