No description
304fb5a1ad
Flake lock file updates: • Updated input 'flake-parts': 'github:hercules-ci/flake-parts/dc531e3a9ce757041e1afaff8ee932725ca60002' (2023-03-01) → 'github:hercules-ci/flake-parts/c13d60b89adea3dc20704c045ec4d50dd964d447' (2023-03-09) • Updated input 'flake-parts/nixpkgs-lib': 'github:NixOS/nixpkgs/7f5639fa3b68054ca0b062866dc62b22c3f11505?dir=lib' (2023-02-26) → 'github:NixOS/nixpkgs/130fa0baaa2b93ec45523fdcde942f6844ee9f6e?dir=lib' (2023-03-09) • Updated input 'haskell-flake': 'github:srid/haskell-flake/89600cd14a719497044b4389fb186960257b2461' (2023-03-02) → 'github:srid/haskell-flake/56d8d9787ad8914bf54c2580a4dbb80adbe38f35' (2023-03-10) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/ae8bdd2de4c23b239b5a771501641d2ef5e027d0' (2023-03-01) → 'github:nixos/nixpkgs/5496585eb876f2ce97654bc8f96838c6f8642563' (2023-03-10) • Updated input 'treefmt-nix': 'github:numtide/treefmt-nix/f7fcf3770c6cec6fd5f995ba94e6e6376019b9ff' (2023-02-26) → 'github:numtide/treefmt-nix/ec39cfa24342fdf0b04ae44592a191c4765f9c74' (2023-03-08) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
---|---|---|
.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://haskell.flake.page/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