This is an opinionated pre-built Dev Container for Haskell (GHC 9.8.4 LTS).
Follow the steps below to use the Dev Container with Visual Studio Code:
- Follow the Getting Started instructions to configure Visual Studio Code and Docker for use with Dev Containers;
- Copy the
.devcontainer
folder in this repository to the root of your project; - Reload the project by opening the command palette (Ctrl + Shift + P or Cmd + Shift + P) and executing the command
>Reload Window
or by closing and re-opening Visual Studio Code; - Click
Reopen in Container
when Visual Studio Code prompts you (see image below), or by opening the command palette (Ctrl + Shift + P or Cmd + Shift + P) and executing the command>Dev Containers: Reopen in Container
(downloading the image initially make take a while, as it is over 15 gigabytes); - (Optional) Copy the
.ghci
file in this repository to the root of your project.
Visual Studio Code supports Dev Containers (i.e. using a Docker image as a development environment). It automates the hassle of setting up a proper development environment.
The container comes with the following (relevant) software pre-installed:
debian:bookworm-slim
as a base image;- GNU Bash;
- Git;
- GHCUp;
- The Glasgow Haskell Compiler (GHC) (version 9.8.4 LTS);
- The Haskell Language Server (HLS);
- Stack;
- Cabal.
The following packages come pre-installed:
- fsnotify - cross platform library for file creation, modification, and deletion notification;
- haskell-dap - Haskell implementation of the DAP interface data;
- ghci-dap - a GHCi with DAP machine interface;
- haskell-debug-adapter - a debug adapter for Haskell debugging system;
- hlint - gives suggestions on how to improve your source code;
- apply-refact - perform refactorings specified by the refact library;
- retrie - a tool for codemodding Haskell;
- hoogle - a Haskell API search engine;
- ormolu - a formatter for Haskell source code;
- implicit-hie - auto-generate a Stack or Cabal multi-component
hie.yaml
file.
Following VSCode extensions are automatically installed after container is started: