An opinionated project template for Haskell applications with a Nix dev environment.
Encouraged processes:
Encouraged tech stack:
- Haskell
- ghc
- cabal
- hpack (remove some tedium of updating cabal files)
- relude (alternative Prelude)
- ghcid (fast recompile and test watcher)
- haskell-language-server (IDE support)
- @lexi-lambda's recommended ghc flags and language extensions
- ormolu (code formatting)
- Nix
- nixpkgs
- nixpkgs's Haskell ecosystem
- Gabriella439/haskell-nix (best practices for Haskell development with Nix)
- niv (dependency pinning without requiring flakes)
- nixfmt (code formatting)
- shake (build scripting)
- git (version control)
- markdown (documentation format)
- taskell (kanban boards saved as markdown files)
- PlantUML (plain-text architecture diagrams)
nix-shell -p cookiecutter --run "cookiecutter https://github.com/avh4/haskell-with-nix.git"
# cd into the new folder
direnv allow
dev/build.sh cabal.project.freeze
git init
git add .
git commit -m "Initialize from template"
dev/run.sh # Run the app
dev/build.sh # Compile the app and run tests
dev/build.sh watch # Re-run tests on changes
dev/build.sh watch:warnings # Re-run compiler for warnings on changes
dev/build.sh autofix # Fix formatting and linting errors
dev/build.sh --help # Print all available build script targets