stack/README.md

96 lines
4.2 KiB
Markdown
Raw Normal View History

2015-05-26 15:57:12 +00:00
## The Haskell Tool Stack
2015-04-29 19:47:45 +00:00
2015-06-09 08:37:58 +00:00
[![Build Status](https://travis-ci.org/commercialhaskell/stack.svg?branch=master)](https://travis-ci.org/commercialhaskell/stack)
[![Release](https://img.shields.io/github/release/commercialhaskell/stack.svg)](https://github.com/commercialhaskell/stack/releases)
2015-06-09 08:37:58 +00:00
2015-06-08 14:34:30 +00:00
`stack` is a cross-platform program for developing Haskell
projects. It is aimed at Haskellers both new and experienced.
2015-06-07 11:13:04 +00:00
2015-06-08 14:36:17 +00:00
<img src="http://i.imgur.com/WW69oTj.gif" width="50%" align="right">
2015-06-07 11:13:04 +00:00
2015-06-08 14:34:30 +00:00
It features:
2015-06-07 11:13:04 +00:00
2015-06-08 14:34:30 +00:00
* Installing GHC automatically.
* Installing packages needed for your project.
* Building your project.
* Testing your project.
* Benchmarking your project.
2015-05-26 15:57:12 +00:00
2015-06-08 14:34:30 +00:00
#### How to install
2015-06-07 11:13:04 +00:00
2015-06-08 14:34:30 +00:00
Downloads are available by operating system:
2015-06-07 11:13:04 +00:00
2015-06-09 08:26:12 +00:00
* [Windows](https://github.com/commercialhaskell/stack/wiki/Downloads#windows)
* [OS X](https://github.com/commercialhaskell/stack/wiki/Downloads#os-x)
* [Ubuntu](https://github.com/commercialhaskell/stack/wiki/Downloads#ubuntu)
* [Debian](https://github.com/commercialhaskell/stack/wiki/Downloads#debian)
2015-08-12 00:30:39 +00:00
* [CentOS / Red Hat / Amazon Linux](https://github.com/commercialhaskell/stack/wiki/Downloads#centos--red-hat--amazon-linux)
* [Fedora](https://github.com/commercialhaskell/stack/wiki/Downloads#fedora)
2015-06-09 08:26:12 +00:00
* [Arch Linux](https://github.com/commercialhaskell/stack/wiki/Downloads#arch-linux)
* [Linux (general)](https://github.com/commercialhaskell/stack/wiki/Downloads#linux)
2015-06-07 11:13:04 +00:00
2015-08-12 00:29:53 +00:00
[Upgrade instructions](https://github.com/commercialhaskell/stack/wiki/Downloads#upgrade)
2015-08-12 00:29:26 +00:00
2015-08-12 15:27:23 +00:00
Note: if you are using cabal-install to install stack, you may need to pass a constraint to work around a [Cabal issue](https://github.com/haskell/cabal/issues/2759): `cabal install --constraint 'mono-traversable >= 0.9' stack`.
2015-08-12 14:25:48 +00:00
2015-06-08 14:34:30 +00:00
#### How to use
2015-06-07 11:13:04 +00:00
Go into a Haskell project directory and run `stack build`. If everything is
already configured, this will:
2015-05-26 15:57:12 +00:00
2015-06-08 14:34:30 +00:00
* 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 new` to create a brand new project.
* `stack init` to create a stack configuration file for an existing project.
stack will figure out what Stackage release (LTS or nightly) is appropriate
for the dependencies.
2015-06-18 06:39:29 +00:00
* `stack setup` to download and install the correct GHC version. (For
information on installation paths, please use the `stack path` command.)
If you just want to install a package using stack, then all you have
2015-06-25 09:05:24 +00:00
to do is `stack install <package-name>`.
2015-06-08 14:34:30 +00:00
Run `stack` for a complete list of commands.
2015-06-07 11:13:04 +00:00
2015-06-08 14:34:30 +00:00
#### Architecture
2015-06-07 08:17:25 +00:00
2015-06-08 14:34:30 +00:00
A full description of the architecture
2015-06-09 08:26:12 +00:00
[is available here](https://github.com/commercialhaskell/stack/wiki/Architecture).
#### Questions, Feedback, Discussion
* For frequently asked questions about detailed or specific use-cases,
please see
[the FAQ](https://github.com/commercialhaskell/stack/wiki/FAQ).
* For general questions, comments, feedback and support please write
2015-06-21 06:08:11 +00:00
to [the stack mailing list](https://groups.google.com/d/forum/haskell-stack).
* For bugs, issues, or requests please
[open an issue](https://github.com/commercialhaskell/stack/issues/new).
* When using Stack Overflow, please use [the haskell-stack
tag](http://stackoverflow.com/questions/tagged/haskell-stack).
2015-06-08 14:34:30 +00:00
#### Why stack?
2015-06-07 11:13:04 +00:00
stack is a project of the [Commercial Haskell](http://commercialhaskell.com/)
group, spearheaded by [FP Complete](https://www.fpcomplete.com/). 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](https://github.com/fpco/stackage-cli) to meet the needs of
2015-06-07 11:13:04 +00:00
users everywhere.
A large impetus for the work on stack was a [large survey of people interested
in
Haskell](https://www.fpcomplete.com/blog/2015/05/thousand-user-haskell-survey),
which rated build issues as a major concern. The stack team hopes that stack
can address these concerns.