Skip to content

Instantly share code, notes, and snippets.

@kazu-yamamoto
Created November 14, 2013 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazu-yamamoto/7461668 to your computer and use it in GitHub Desktop.
Save kazu-yamamoto/7461668 to your computer and use it in GitHub Desktop.
ELisp configuration for Haskell
(load "haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(add-hook 'haskell-mode-hook 'turn-on-font-lock)
(defun haskell-style ()
"Sets the current buffer to use Haskell Style. Meant to be
added to `haskell-mode-hook'"
(setq tab-width 4
haskell-indentation-layout-offset 4
haskell-indentation-left-offset 4
haskell-indentation-ifte-offset 4))
(autoload 'ghc-init "ghc" nil t)
(add-hook 'haskell-mode-hook
(lambda ()
(setq show-trailing-whitespace t)
(ghc-init)
(flymake-mode)))
(add-hook 'haskell-mode-hook 'haskell-style)
(add-hook 'haskell-cabal-mode-hook
(lambda ()
(setq show-trailing-whitespace t)
(setq indent-tabs-mode nil)))
(setq ghc-hlint-options '("--ignore=Use camelCase"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment