From 19a64173d18c9d587f90231da43bda6fa96a9cad Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Sun, 1 Mar 2015 18:49:01 -0600 Subject: [PATCH] Actually useful haskell mode. --- emacs/.emacs.d/emacs.org | 58 +++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/emacs/.emacs.d/emacs.org b/emacs/.emacs.d/emacs.org index fde1348..c496d0c 100644 --- a/emacs/.emacs.d/emacs.org +++ b/emacs/.emacs.d/emacs.org @@ -879,32 +879,48 @@ Make it even easier with hints like intellisense. Need to make haskell source be all pretty. #+BEGIN_SRC emacs-lisp - (use-package haskell-mode + (use-package haskell-mode + :ensure t + :config + (progn + (use-package hindent :ensure t :config (progn - (use-package hindent - :ensure t - :config (progn - (add-hook 'haskell-mode-hook #'hindent-mode) - ) - ) - (use-package flycheck-haskell :ensure t) - (use-package flycheck-hdevtools - :ensure t - :defer t - :config (progn - (add-hook 'haskell-mode-hook 'flycheck-mode) - ) - ) - (add-hook 'haskell-mode-hook 'interactive-haskell-mode) - (add-hook 'haskell-mode-hook 'turn-on-haskell-indent) - (add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) - (customize-set-variable 'haskell-program-name "ghci") - (add-to-list 'completion-ignored-extensions ".hi") - (customize-set-variable 'haskell-font-lock-symbols t) + (add-hook 'haskell-mode-hook #'hindent-mode) ) ) + (use-package flycheck-haskell :ensure t) + (use-package flycheck-hdevtools + :ensure t + :config + (progn + (add-hook 'haskell-mode-hook 'flycheck-mode) + ) + ) + (use-package ghc + :ensure t + :config + (progn + (autoload 'ghc-init "ghc" nil t) + (autoload 'ghc-debug "ghc" nil t) + (add-hook 'haskell-mode-hook (lambda () + (ghc-init) + ) + ) + ) + ) + (add-hook 'haskell-mode-hook 'interactive-haskell-mode) + (add-hook 'haskell-mode-hook 'turn-on-haskell-indent) + (add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) + (custom-set-variables + '(haskell-program-name "ghci") + '(haskell-font-lock-symbols t) + '(haskell-tags-on-save t) + ) + (add-to-list 'completion-ignored-extensions ".hi") + ) + ) #+END_SRC * mode related