Latest commit 692f6ff Jan 17, 2017 @borsboom borsboom Add etc/scripts/mirror-ghc-bindists-to-github.sh
Update MAINTAINER_GUIDE to reference it for adding a new GHC
version.
Permalink
..
Failed to load latest commit information.
CONTRIBUTING.md Doc updates for readthedocs.org Nov 24, 2015
ChangeLog.md Doc updates for readthedocs.org Nov 24, 2015
GUIDE.md doc/GUIDE: reflect changes to defaults wrt GPG signing. Jan 2, 2017
MAINTAINER_GUIDE.md Add etc/scripts/mirror-ghc-bindists-to-github.sh Jan 17, 2017
README.md docs: Mac OS X renamed to macOS Dec 9, 2016
SIGNING_KEY.md Doc updates for readthedocs.org Nov 24, 2015
architecture.md wrap docs to 80 chars. Sep 13, 2016
build_command.md Dump build logs if they contain warnings (fixes #2545) Sep 30, 2016
coverage.md Fix magic 'extra-tix-files' dir #2609 Oct 24, 2016
custom_snapshot.md Attempt to fix code block rendering on readthedocs Oct 1, 2016
dependency_visualization.md Allow targets and flags for dot and list-dependencies #1919 Oct 10, 2016
docker_integration.md docs: Mac OS X renamed to macOS Dec 9, 2016
faq.md the proper upstream ticket Dec 22, 2016
ghci.md Fix a spelling error Nov 22, 2016
ghcjs.md Update ghcjs.md Dec 26, 2016
install_and_upgrade.md doc/install_and_upgrade: remove APT/YUM repos Dec 16, 2016
nix_integration.md Nix: Added info to README about env vars & setup Jan 10, 2017
nonstandard_project_init.md wrap docs to 80 chars. Sep 13, 2016
shell_autocompletion.md wrap docs to 80 chars. Sep 13, 2016
travis-complex.yml docs: Mac OS X renamed to macOS Dec 9, 2016
travis-simple.yml travis: use "generic" language instead Nov 24, 2016
travis_ci.md docs: Mac OS X renamed to macOS Dec 9, 2016
yaml_configuration.md Docs: Add hint for corresponding --haddock-arguments flag to default … Jan 16, 2017

README.md

The Haskell Tool Stack

Stack is a cross-platform program for developing Haskell projects. It is aimed at Haskellers both new and experienced.

It features:

  • Installing GHC automatically, in an isolated location.
  • Installing packages needed for your project.
  • Building your project.
  • Testing your project.
  • Benchmarking your project.

How to install

For many Un*x operating systems, all you need to do is run:

curl -sSL https://get.haskellstack.org/ | sh

or:

wget -qO- https://get.haskellstack.org/ | sh

For detailed instructions and downloads, instructions are available by operating system/distribution:

Upgrade instructions

Quick Start Guide

First you need to install it (see previous section).

Start your new project:
stack new my-project
cd my-project
stack setup
stack build
stack exec my-project-exe
  • The stack new command will create a new directory containing all the needed files to start a project correctly.
  • The stack setup will download the compiler if necessary in an isolated location (default ~/.stack) that won't interfere with any system-level installations. (For information on installation paths, please use the stack path command.).
  • The stack build command will build the minimal project.
  • stack exec my-project-exe will execute the command.
  • If you just want to install an executable using stack, then all you have to do isstack install <package-name>.

If you want to launch a REPL:

stack ghci

Run stack for a complete list of commands.

Workflow

The stack new command should have created the following files:

.
├── LICENSE
├── Setup.hs
├── app
│   └── Main.hs
├── my-project.cabal
├── src
│   └── Lib.hs
├── stack.yaml
└── test
    └── Spec.hs

    3 directories, 7 files

So to manage your library:

  1. Edit files in the src/ directory.

The app directory should preferably contain only files related to executables.

  1. If you need to include another library (for example the package text:

    • Add the package text to the file my-project.cabal in the section build-depends: ....
    • run stack build another time
  2. If you get an error that tells you your package isn't in the LTS. Just try to add a new version in the stack.yaml file in the extra-deps section.

It was a really fast introduction on how to start to code in Haskell using stack. If you want to go further, we highly recommend you to read the stack guide.

How to contribute

This assumes that you have already installed a version of stack, and have git installed.

  1. Clone stack from git with git clone https://github.com/commercialhaskell/stack.git.
  2. Enter into the stack folder with cd stack.
  3. Build stack using a pre-existing stack install with stack setup && stack build.
  4. Once stack finishes building, check the stack version with stack exec stack -- --version. Make sure the version is the latest.
  5. Look for issues tagged with newcomer and awaiting-pr labels.

Build from source as a one-liner:

git clone https://github.com/commercialhaskell/stack.git && \
cd stack && \
stack setup && \
stack build

Complete guide to stack

This repository also contains a complete user guide to using stack , covering all of the most common use cases.

Questions, Feedback, Discussion

Why stack?

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.