2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Emacs] flycheck で hlintを使う

Posted at

[Emacs] flycheckhlintを使う

hlintのインストール

cabalを使う場合
$ cabal install hlint
Ubuntuでパッケージを使う場合(おすすめしない)
$ sudo apt-get install hlint

Emacsの設定

flycheckのインストール

Caskを使う場合、以下をファイルCaskに追加する。

Cask
(depends-on "flycheck")

元から入っているパッケージシステムを使う場合、
M-x package-installでパッケージを聞かれるので、flycheckを指定してください。

haskell-modeでのflycheckの設定

.emacs.d/init.el
(add-hook 'haskell-mode-hook
          '(lambda ()
             (setq flycheck-checker 'haskell-hlint)
             (flycheck-mode 1)))

おまけ

cabal-dev使ってたら不都合が出たので、haskell-ghcチェッカをオフにしました。

.emacs.d/init.el
(add-hook 'haskell-mode-hook
          '(lambda ()
             (setq flycheck-checker 'haskell-hlint)
             (setq flycheck-disabled-checkers '(haskell-ghc))
             (flycheck-mode 1)))

参考文献

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?