hlint again in Elisp.
This commit is contained in:
parent
fa4222f727
commit
9ab0f4bf19
@ -45,7 +45,9 @@
|
||||
(ghc-defstruct hilit-info file line col msg err)
|
||||
|
||||
(defun ghc-check-send ()
|
||||
(concat "check " ghc-process-original-file "\n"))
|
||||
(if ghc-check-command
|
||||
(concat "lint " ghc-process-original-file "\n")
|
||||
(concat "check " ghc-process-original-file "\n")))
|
||||
|
||||
(defun ghc-check-callback ()
|
||||
(let ((regex "^\\([^\n\0]*\\):\\([0-9]+\\):\\([0-9]+\\): *\\(.+\\)")
|
||||
@ -252,4 +254,17 @@
|
||||
(insert " _"))
|
||||
(insert " = error \"" fn "\"")))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defvar ghc-hlint-options nil "*Hlint options")
|
||||
|
||||
(defvar ghc-check-command nil)
|
||||
|
||||
(defun ghc-toggle-check-command ()
|
||||
(interactive)
|
||||
(setq ghc-check-command (not ghc-check-command))
|
||||
(if ghc-check-command
|
||||
(message "Syntax check with hlint")
|
||||
(message "Syntax check with GHC")))
|
||||
|
||||
(provide 'ghc-check)
|
||||
|
@ -78,7 +78,7 @@
|
||||
(define-key haskell-mode-map ghc-insert-key 'ghc-insert-template)
|
||||
(define-key haskell-mode-map ghc-sort-key 'ghc-sort-lines)
|
||||
(define-key haskell-mode-map ghc-check-key 'ghc-save-buffer)
|
||||
;; (define-key haskell-mode-map ghc-toggle-key 'ghc-flymake-toggle-command) -- fixme
|
||||
(define-key haskell-mode-map ghc-toggle-key 'ghc-toggle-check-command)
|
||||
(define-key haskell-mode-map ghc-module-key 'ghc-insert-module)
|
||||
(define-key haskell-mode-map ghc-hoogle-key 'haskell-hoogle)
|
||||
(define-key haskell-mode-map ghc-shallower-key 'ghc-make-indent-shallower)
|
||||
|
Loading…
Reference in New Issue
Block a user