No description
385039139c
• Updated input 'haskell-flake': 'github:srid/haskell-flake/c6ff897db9abdd4e5ff7911b5f9234a1380c6611' (2023-01-18) → 'github:srid/haskell-flake/8688fb2deaa193795467eedb4d2473dbeaba19b4' (2023-01-23) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/676c80dcc2f0ba780c8ab204f92c5abd69fa1245' (2023-01-19) → 'github:nixos/nixpkgs/ef479383e13698c8d5ccf8a608485dc8ce1d4f80' (2023-01-22) • Updated input 'treefmt-nix': 'github:numtide/treefmt-nix/6717065d6a432bc3f5b827007ad959e6032d5856' (2023-01-05) → 'github:numtide/treefmt-nix/d5ed9a1e6793f99b2e179d5dec9639e48ef22db7' (2023-01-23) |
||
---|---|---|
.github/workflows | ||
.vscode | ||
src | ||
.envrc | ||
.gitattributes | ||
.gitignore | ||
.hlint.yaml | ||
flake.lock | ||
flake.nix | ||
fourmolu.yaml | ||
haskell-template.cabal | ||
hie.yaml | ||
LICENSE | ||
README.md | ||
shell.nix |
haskell-template
Get a Haskell development environment up and running quickly. Thanks to Nix, this template is optimized for a fully reproducible and friendly development environment. It is based on:
- Nix + Flakes (via
github:srid/haskell-flake
) + GHC 9.2 - VSCode + HLS
- fourmolu autoformatting
- Relude as Prelude.
.hlint.yaml
is from relude
- Devshell scripts (
,
prefixed) are provided via mission-control
If you have an existing Haskell project, you should probably use https://github.com/srid/haskell-flake instead.
Getting Started
tldr: Install Nix, enable Flakes, open in VSCode and run , run
.
For details, see: https://srid.ca/haskell-template/start
Tips
- Run
nix flake update
to update all flake inputs. - Run
nix build .#check -L
to run the flake checks. - Run
, fmt
in nix shell to autoformat the project. This uses treefmt. - Run
, docs
to start Hoogle with packages in your cabal file. - Run the application without installing:
nix run github:srid/haskell-template
(ornix run .
from checkout) - Common workflows
- Adding library dependencies in Nix: https://srid.ca/haskell-template/dependency
- Adding tests: https://srid.ca/haskell-template/tests
Discussions
Questions? Ideas? Suggestions? You may post them here: https://github.com/srid/haskell-template/discussions