[ANN] Working with HLint from Emacs

Hello For Emacs users it could be interesting - I wrote small module for more comfortable work with HLint from Emacs. It has same functionality as compilation-mode - navigation between errors, etc. To use it, just add following code to emacs init file: (require 'hs-lint) (defun my-haskell-mode-hook () (local-set-key "\C-cl" 'hs-lint)) (add-hook 'haskell-mode-hook 'my-haskell-mode-hook) Module is available from http://xtalk.msk.su/~ott/common/emacs/hs-lint.el -- With best wishes, Alex Ott, MBA http://alexott.blogspot.com/ http://xtalk.msk.su/~ott/ http://alexott-ru.blogspot.com/

"Alex" == Alex Ott
writes:
Alex> Hello For Emacs users it could be interesting - I wrote small Alex> module for more comfortable work with HLint from Emacs. It has Alex> same functionality as compilation-mode - navigation between Alex> errors, etc. Thank you for it. Alex> Module is available from Alex> http://xtalk.msk.su/~ott/common/emacs/hs-lint.el Module is not under some dvcs? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D ----------------------------------------------------------------

Hi Gour,
Alex> Module is available from Alex> http://xtalk.msk.su/~ott/common/emacs/hs-lint.el
Module is not under some dvcs?
I put it in the main HLint repo last night: http://www.cs.york.ac.uk/fp/darcs/hlint/data/hs-lint.el Please send all patches for this particular file via Alex. Thanks Neil

"AV" == Andrea Vezzosi writes: AV> Does it also let you apply a suggestion automatically?
Not, i'll look for this suggestion, but i'm not sure, that this is possible -- With best wishes, Alex Ott, MBA http://alexott.blogspot.com/ http://xtalk.msk.su/~ott/ http://alexott-ru.blogspot.com/

"Alex" == Alex Ott
writes:
Alex> Hello For Emacs users it could be interesting - I wrote Alex> small module for more comfortable work with HLint from Alex> Emacs. It has same functionality as compilation-mode - Alex> navigation between errors, etc. Alex> To use it, just add following code to emacs init file: Alex> (require 'hs-lint) (defun my-haskell-mode-hook () Alex> (local-set-key "\C-cl" 'hs-lint)) (add-hook Alex> 'haskell-mode-hook 'my-haskell-mode-hook) I've done that. Now how do you get it to do anything? -- Colin Adams Preston Lancashire

On Wed, Jan 28, 2009 at 6:30 AM, Colin Paul Adams
"Alex" == Alex Ott
writes: Alex> Hello For Emacs users it could be interesting - I wrote Alex> small module for more comfortable work with HLint from Alex> Emacs. It has same functionality as compilation-mode - Alex> navigation between errors, etc.
Alex> To use it, just add following code to emacs init file:
Alex> (require 'hs-lint) (defun my-haskell-mode-hook () Alex> (local-set-key "\C-cl" 'hs-lint)) (add-hook Alex> 'haskell-mode-hook 'my-haskell-mode-hook)
I've done that.
Now how do you get it to do anything? -- Colin Adams
Presumably now every time you use C-c l to load the current buffer into GHCi, it'll show hlint warnings about that file (in addition to whatever -Wall warnings you've enabled). It's a straightforward use of Emacs hooks. -- gwern

Hello
On Wed, Jan 28, 2009 at 12:30 PM, Colin Paul Adams
"Alex" == Alex Ott
writes: Alex> Hello For Emacs users it could be interesting - I wrote Alex> small module for more comfortable work with HLint from Alex> Emacs. It has same functionality as compilation-mode - Alex> navigation between errors, etc. .... I've done that. Now how do you get it to do anything?
In your source file, opened in Emacs, just press C-c l, and it will run HLint and you'll able to navigate between suggestions with C-x ` combination. P.S. Today i released the second version of package, that allows to apply suggestions to source code - see more details at http://alexott.blogspot.com/2009/02/second-version-of-hs-lint-package.html -- With best wishes, Alex Ott, MBA http://alexott.blogspot.com/ http://alexott-ru.blogspot.com/ http://xtalk.msk.su/~ott/
participants (6)
-
Alex Ott
-
Andrea Vezzosi
-
Colin Paul Adams
-
Gour
-
Gwern Branwen
-
Neil Mitchell