Skip to content
language23 active rulesVerified 2026-09-30

Haskell .gitignore Template

Haskell Stack, Cabal dist directories, GHC object files, and hi files. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Open in Full Generator
Search for templates
Quick add:
Selected1
Haskell
Selected Templates (1)
.gitignore
### Haskell ###
dist
dist-*
cabal-dev
*.o
*.hi
*.hie
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
cabal.project.local~
.HTF/
.ghc.environment.*
23 rules1 template25 lines
Deterministic

Raw Haskell .gitignore

Crawlable upstream source template
haskell.gitignore24 lines
dist
dist-*
cabal-dev
*.o
*.hi
*.hie
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
cabal.project.local~
.HTF/
.ghc.environment.*

Key Pattern Breakdown

Build & Compilation Artifacts

Ignores compiled binaries, intermediate object files, and build output directories generated during development.

distdist-**.o*.aux

Environment & Secrets

Prevents leaking sensitive local credentials, API keys, database URLs, and environment configuration files.

.ghc.environment.*

Source & Verification

License:: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.