Module documentation for 9.9.9
The Haskell Tool Stack
stack is a cross-platform program for developing Haskell
projects. It is aimed at Haskellers both new and experienced.
- Installing GHC automatically.
- Installing packages needed for your project.
- Building your project.
- Testing your project.
- Benchmarking your project.
How to install
Downloads are available by operating system:
How to use
Go into a Haskell project directory and run
stack build. If everything is
already configured, this will:
- Download the package index.
- Download and install all necessary dependencies for the project.
- Build and install the project.
You may be prompted to run some of the following along the way:
stack newto create a brand new project.
stack initto create a stack configuration file for an existing project. stack will figure out what Stackage release (LTS or nightly) is appropriate for the dependencies.
stack setupto download and install the correct GHC version. (For information on installation paths, please use the
If you just want to install a package using stack, then all you have
to do is
stack install <package-name>.
stack for a complete list of commands.
A full description of the architecture is available here.
Questions, Feedback, Discussion
- For frequently asked questions about detailed or specific use-cases, please see the FAQ.
- For general questions, comments, feedback and support please write to the stack mailing list.
- For bugs, issues, or requests please open an issue.
stack is a project of the Commercial Haskell group, spearheaded by FP Complete. It is designed to answer the needs of commercial Haskell users, hobbyist Haskellers, and individuals and companies thinking about starting to use Haskell. It is intended to be easy to use for newcomers, while providing the customizability and power experienced developers need.
While stack itself has been around since June of 2015, it is based on codebases used by FP Complete for its corporate customers and internally for years prior. stack is a refresh of that codebase combined with other open source efforts like stackage-cli to meet the needs of users everywhere.
A large impetus for the work on stack was a large survey of people interested in Haskell, which rated build issues as a major concern. The stack team hopes that stack can address these concerns.
- Remove GHC uncompressed tar file after installation #376
- Put stackage snapshots JSON on S3 #380
- Specifying flags for multiple packages #335
- single test suite failure should show entire log #388
- valid-wanted is a confusing option name #386
- stack init in multi-package project should use local packages for dependency checking #384
- Display information on why a snapshot was rejected #381
- Give a reason for unregistering packages #389
stack execaccepts the
- Don’t require build plan to upload #400
- Specifying test components only builds/runs those tests #398
- Add the
stack upgradeadded #237
--stack-yamlcommand line flag #378
--skip-ghc-checkcommand line flag #423
- Haddock links to global packages no longer broken on Windows #375
- Make flags case-insensitive #397
- Mark packages uninstalled before rebuilding #365
- Fall back to cabal dependency solver when a snapshot can’t be found
- Basic implementation of
stack solvercommand #364
stack pathcommand #95
- Haddocks #143:
- Build for dependencies
- Use relative links
- Generate module contents and index for all packages in project
uploadcommand ported from stackage-upload #225
- Specify intra-package target #201
- Fix some Windows specific bugs #216
- Improve output for package index updates #227
- Automatically update indices as necessary #227
- –verbose flag #217
- Remove packages (HTTPS and Git) #199
- Config values for system-ghc and install-ghc
stack depsfunctionality into
installcommand #153 and #272
- overriding architecture value (useful to force 64-bit GHC on Windows, for example)
- Overhauled test running (allows cycles, avoids unnecessary recompilation, etc)
- First public release, beta quality