.gitignore for Haskell
23 ignore rules for Haskell, ready to copy into your repository.
Purely functional programming language
The complete .gitignore for Haskell
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:28:16 UTC
# Technologies: Haskell
### Haskell ###
dist
dist-*
cabal-dev
*.hi
*.hie
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
# Object file
*.o
.stack-work/
cabal.project.local
cabal.project.local~
.HTF/
.ghc.environment.*
What these Haskell rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
General
| Pattern | What it ignores |
|---|---|
dist |
General |
dist-* |
General |
cabal-dev |
General |
*.hi |
General |
*.hie |
General |
*.chi |
General |
*.chs.h |
General |
*.dyn_o |
General |
*.dyn_hi |
General |
.hpc |
General |
.hsenv |
General |
.cabal-sandbox/ |
General |
cabal.sandbox.config |
General |
*.prof |
General |
*.aux |
General |
*.hp |
General |
*.eventlog |
General |
*.o |
Object file |
.stack-work/ |
General |
cabal.project.local |
General |
cabal.project.local~ |
General |
.HTF/ |
General |
.ghc.environment.* |
General |
How to use this .gitignore for Haskell
- Copy the Haskell rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.