Skip to content

Instantly share code, notes, and snippets.

@cmoore
Created July 2, 2009 19:18
Show Gist options
  • Save cmoore/139653 to your computer and use it in GitHub Desktop.
Save cmoore/139653 to your computer and use it in GitHub Desktop.
(add-to-list 'load-path "~/emacs/haskell")
(load "~/emacs/haskell/haskell-site-file" )
(require 'inf-haskell)
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(setq haskell-program-name "ghci")
(defun flymake-get-Haskell-cmdline (source base-dir)
(list "flycheck_haskell.pl"
(list source base-dir)))
;; flymake for Haskell
(defun flymake-Haskell-init ()
(flymake-simple-make-init-impl
'flymake-create-temp-with-folder-structure nil nil
buffer-file-name
'flymake-get-Haskell-cmdline))
(push '(".+\\.[hg]s$" flymake-Haskell-init)
flymake-allowed-file-name-masks)
(push '(".+\\.l[hg]$" flymake-Haskell-init)
flymake-allowed-file-name-masks)
(push '("^\\(\.+\.hs\\|\.lhs\\):\\([0-9]+\\):\\([0-9]+\\):\\(.+\\)"
1 2 3 4) flymake-err-line-patterns)
(add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment