From: Ramakrishnan Muthukrishnan Date: Sat, 23 Jul 2016 15:17:29 +0000 (+0530) Subject: refactor haskell stuff X-Git-Url: https://git.rkrishnan.org/about.html?a=commitdiff_plain;h=37734830f99a30094c724e6bb8f723c539056c03;p=.emacs.d.git refactor haskell stuff --- diff --git a/init.el b/init.el index 7cdccee..949bbdf 100644 --- a/init.el +++ b/init.el @@ -77,9 +77,6 @@ ;; 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) @@ -101,6 +98,21 @@ (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) @@ -220,6 +232,6 @@ (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) diff --git a/packages.el b/packages.el index 63657d0..e9df4f9 100644 --- a/packages.el +++ b/packages.el @@ -22,6 +22,7 @@ (setq package-list '(go-mode rust-mode haskell-mode + hindent ghc restclient tangotango-theme