From 7c0f2511d01e0cc99f412eabca9a16bbf2884e9e Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 28 Mar 2014 14:41:12 +0900 Subject: [PATCH] hlint options. --- elisp/ghc-check.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/elisp/ghc-check.el b/elisp/ghc-check.el index f1f5591..d50511e 100644 --- a/elisp/ghc-check.el +++ b/elisp/ghc-check.el @@ -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)