LoginSignup
1
3

More than 3 years have passed since last update.

macOSでVS CodeのHaskellの環境構築で嵌った点

Posted at

vscode と haskell-ide-engine で Haskell 開発環境を構築するを参考に、macOSで環境構築を行いましたが、いくつか嵌った点があるので、解決策を残しておきます。

HIE 8.6.4がビルドできない

`gcc' failed in phase `Linker'. (Exit code: 1)

というエラーが出て最後にリンクで失敗しhieがビルドできていませんでしたが、代わりにHIE 8.4.4をビルドすると成功しました。

  • Before
$ git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules
$ cd haskell-ide-engine
$ stack ./install.hs hie-8.6.4
  • After
$ git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules
$ cd haskell-ide-engine
$ stack ./install.hs hie-8.4.4

VS Code上でHIEが動かない

The Haskell HIE (test) server crashed 5 times in the last 3 minutes. 
The server will not be restarted.

というエラーメッセージが出て、VS Codeの拡張機能(Haskell Language Server)とHIEがうまく連携できていませんでしたが、stack newでプロジェクトを作成した上で、HieWrapperを無効化すると上手くいきました。
VS Codeのsetting.jsonを以下のように編集します。

  • Before
"languageServerHaskell.useCustomHieWrapper": true
  • After
"languageServerHaskell.useCustomHieWrapper": false
1
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
1
3