hlint options.

This commit is contained in:
Kazu Yamamoto 2014-03-28 14:41:12 +09:00
parent 7cb9944b0b
commit 7c0f2511d0

View File

@ -46,9 +46,18 @@
(defun ghc-check-send ()
(if ghc-check-command
(concat "lint " ghc-process-original-file "\n")
(let ((opts (ghc-haskell-list-of-string ghc-hlint-options)))
(if opts
(concat "lint " opts " " ghc-process-original-file "\n")
(concat "lint " ghc-process-original-file "\n")))
(concat "check " ghc-process-original-file "\n")))
(defun ghc-haskell-list-of-string (los)
(when los
(concat "["
(mapconcat (lambda (x) (concat "\"" x "\"")) los ", ")
"]")))
(defun ghc-check-callback ()
(let ((regex "^\\([^\n\0]*\\):\\([0-9]+\\):\\([0-9]+\\): *\\(.+\\)")
info infos)