LoginSignup
21
12

More than 3 years have passed since last update.

VSCodeのHaskell拡張を使って最速開発環境構築

Posted at

2020/7/28に新しいHaskell拡張がリリースされました。
https://marketplace.visualstudio.com/items?itemName=haskell.haskell

さっそく、こいつを使って最速開発環境構築していくぜ!!!

前提条件

Dockerをインストール

VSCodeをインストール

Remote - Containers拡張のインストール

コンテナ上でHaskell拡張を動作させる

任意のフォルダに.devcontainer.jsonファイルを作成して以下を記載

.devcontainer.json
{
    "name": "HaskellDevContainer",
    // DockerhubのHaskell公式イメージ
    "image": "haskell:8.8",
    "extensions": [
        // HaskellのVSCode拡張をインストール
        // https://marketplace.visualstudio.com/items?itemName=haskell.haskell
        "haskell.haskell"
    ]
}

VSCodeで.devcontainer.jsonがあるフォルダをひらいて、左下の緑の部分からReopen in Containerを選択
image.png
image.png

コンテナ内でVSCodeが起動したら、あとはHaskellファイルを作成してコードを書くだけ。
image.png

Stackもデフォルトでインストール済みだ!

21
12
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
21
12