LoginSignup
20
16

More than 5 years have passed since last update.

Atom EditorでHaskell

Posted at

如法会 1の資料 その1です。
Atom EditorでHaskellの環境を整える記事はいくつかありましたが、ちょっと古げなので書いておきます。

最近はstackをインストールするだけでghcが使える。
なので、まずは、stackをインストールする。OS Xの場合をかいておく。

$ brew install haskell-stack

エディターが利用するhaskellのパッケージをインストールする。

$ stack install stylish-haskell hlint ghc-mod

Atom Editorをインストールする。
AtomをインストールしたらAtomを起動して「install shell Commands」でatomコマンドとapmコマンドをインストールする。

apmでパッケージをインストールする。

$ apm install ide-haskell autocomplete-haskell haskell-ghc-mod ide-haskell-repl language-haskell linter-hlint linter

インストール後、設定で変更した。

  • autocomplete-haskellの「use Backend」を「haskell-ghc-mod」に変更
  • ide-haskell-replの「Command Path」を「stack」に変更

大体の説明はide-haskellに書いてある。

$HOME/.local/bin/を環境変数PATHに追加している設定例をみたがatomコマンドをつかって起動している限りでは、stackをちゃんとつかえています。

気になってること

設定もapmからできるんじゃないかと気になっている。

入れたパッケージ

参考文献

20
16
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
20
16