Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed Nov 24, 2015
2 parents c59eb26 + 4b58372 commit 4f2d1ed
Show file tree
Hide file tree
Showing 24 changed files with 626 additions and 326 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tags
/*.iml
/src/highlight.js
/src/style.css
/doc/_build
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Contributors Guide

## Bug Reports

When reporting a bug, please write in the following format:
Expand Down
8 changes: 5 additions & 3 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Changelog

## Unreleased changes

Major changes:
Expand All @@ -17,7 +19,7 @@ Major changes:

* GHCJS can now be used with stackage snapshots via the new `compiler` field.
* Windows installers are now available:
[download them here](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#windows)
[download them here](http://docs.haskellstack.org/en/stable/install_and_upgrade.html#windows)
[#613](https://github.com/commercialhaskell/stack/issues/613)
* Docker integration works with non-FPComplete generated images
[#531](https://github.com/commercialhaskell/stack/issues/531)
Expand Down Expand Up @@ -86,7 +88,7 @@ Bug fixes:
* Fix: unlisted files in tests and benchmarks trigger extraneous second build
[#838](https://github.com/commercialhaskell/stack/issues/838)

## v0.1.6.0
## 0.1.6.0

Major changes:

Expand Down Expand Up @@ -231,7 +233,7 @@ Major changes:
* Respect TemplateHaskell addDependentFile dependency changes ([#105](https://github.com/commercialhaskell/stack/issues/105))
* TH dependent files are taken into account when determining whether a package needs to be built.
* Overhauled target parsing, added `--test` and `--bench` options [#651](https://github.com/commercialhaskell/stack/issues/651)
* For details, see [Build commands documentation](doc/build_command.md)
* For details, see [Build commands documentation](http://docs.haskellstack.org/en/stable/build_command.html)

Other enhancements:

Expand Down
201 changes: 4 additions & 197 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,201 +4,8 @@
[![Windows build status](https://ci.appveyor.com/api/projects/status/c1c7uvmw6x1dupcl?svg=true)](https://ci.appveyor.com/project/snoyberg/stack)
[![Release](https://img.shields.io/github/release/commercialhaskell/stack.svg)](https://github.com/commercialhaskell/stack/releases)

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

<img src="http://i.imgur.com/WW69oTj.gif" width="50%" align="right">

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

Downloads are available by operating system:

* [Windows](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#windows)
* [Mac OS X](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#mac-os-x)
* [Ubuntu](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#ubuntu)
* [Debian](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#debian)
* [CentOS / Red Hat / Amazon Linux](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#centos--red-hat--amazon-linux)
* [Fedora](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#fedora)
* [Arch Linux](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#arch-linux)
* [NixOS](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#nixos)
* [Linux (general)](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#linux)

[Upgrade instructions](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md#upgrade)

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`.

#### Quick Start Guide

First you need to [install it (see previous section)](#how-to-install).

##### Start your new project:

~~~ {.bash}
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
is`stack install <package-name>`.

If you want to launch a REPL:

~~~ {.bash}
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 contains only files related to
executables.

2. If you need to include another library (for example the package [`text`](https://hackage.haskell.org/package/text):

- Add the package `text` to the file `my-project.cabal`
in the section `build-depends: ...`.
- run `stack build` another time

3. 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](https://github.com/commercialhaskell/stack/blob/release/doc/GUIDE.md).

#### 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 --version`. Make sure the version is the latest.
5. Look for issues tagged with
[`newcomer` and `awaiting-pr` labels](https://github.com/commercialhaskell/stack/issues?q=is%3Aopen+is%3Aissue+label%3Anewcomer+label%3A%22awaiting+pr%22)

Build from source as a one-liner:

```bash
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
](https://github.com/commercialhaskell/stack/blob/release/doc/GUIDE.md), covering all of the most common use cases.


#### Questions, Feedback, Discussion

* For frequently asked questions about detailed or specific use-cases, please
see [the FAQ](https://github.com/commercialhaskell/stack/blob/release/doc/faq.md).
* For general questions, comments, feedback and support please write
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).

#### Why stack?

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
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.

<hr>

## Documentation Table Of Contents

* Project Documentation
* [Maintainer Guide](https://github.com/commercialhaskell/stack/blob/release/doc/MAINTAINER_GUIDE.md): includes releasing information
* [Signing Key](https://github.com/commercialhaskell/stack/blob/release/doc/SIGNING_KEY.md): downloadable stack binaries are signed
with this key
* Tool Documentation
* [Build Command](https://github.com/commercialhaskell/stack/blob/release/doc/build_command.md): reference for the syntax of the
build command and the command line targets
* [Dependency Visualization](https://github.com/commercialhaskell/stack/blob/release/doc/dependency_visualization.md): uses Graphviz
* [Docker Integration](https://github.com/commercialhaskell/stack/blob/release/doc/docker_integration.md)
* [FAQ](https://github.com/commercialhaskell/stack/blob/release/doc/faq.md): frequently asked questions about detailed or specific
use-cases
* [Install/Upgrade](https://github.com/commercialhaskell/stack/blob/release/doc/install_and_upgrade.md): a list of downloads
available by operating system, installation instructions, and upgrade
instructions
* [Nonstandard Project Initialization](https://github.com/commercialhaskell/stack/blob/release/doc/nonstandard_project_init.md)
* [Shell Autocompletion](https://github.com/commercialhaskell/stack/blob/release/doc/shell_autocompletion.md)
* [User Guide](https://github.com/commercialhaskell/stack/blob/release/doc/GUIDE.md): in-depth tutorial covering the most common use
cases and all major stack features (requires no prior Haskell tooling
experience)
* [YAML Configuration](https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md): reference for writing
`stack.yaml` files
* Advanced Documentation
* [Architecture](https://github.com/commercialhaskell/stack/blob/release/doc/architecture.md): reference for people curious about
stack internals, wanting to get involved deeply in the codebase, or
wanting to use stack in unusual ways
See [haskellstack.org](http://haskellstack.org) or the `doc` directory for more
information.
1 change: 1 addition & 0 deletions doc/CONTRIBUTING.md
1 change: 1 addition & 0 deletions doc/ChangeLog.md
24 changes: 13 additions & 11 deletions doc/GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# User guide

stack is a modern, cross-platform build tool for Haskell code.

This guide takes a new stack user through the typical workflows. This guide
Expand Down Expand Up @@ -46,7 +48,7 @@ all commands work cross-platform, unless explicitly stated otherwise.
## Downloading and Installation

The [documentation dedicated to downloading
stack](install_and_upgrade.md) has the most
stack](install_and_upgrade.html) has the most
up-to-date information for a variety of operating systems, including multiple
GNU/Linux flavors. Instead of repeating that content here, please go check out
that page and come back here when you can successfully run `stack --version`.
Expand Down Expand Up @@ -389,7 +391,7 @@ containing the module in question is not available. To tell stack to use text,
you need to add it to your .cabal file — specifically in your build-depends
section, like this:
```cabal
```
library
hs-source-dirs: src
exposed-modules: Lib
Expand Down Expand Up @@ -617,7 +619,7 @@ At the time of writing:
* Experimental custom snapshot support

The most up-to-date information can always be found in the
[stack.yaml documentation](yaml_configuration.md#resolver).
[stack.yaml documentation](yaml_configuration.html#resolver).

## Existing projects

Expand Down Expand Up @@ -723,7 +725,7 @@ Please choose one of the following commands to get started.
stack init --resolver lts-2.22
You'll then need to add some extra-deps. See the
[stack.yaml documentation](yaml_configuration.md#extra-deps).
[stack.yaml documentation](yaml_configuration.html#extra-deps).
You can also try falling back to a dependency solver with:
Expand Down Expand Up @@ -1026,7 +1028,7 @@ to build.

We're not going to cover the full generality of these arguments here; instead,
there's [documentation covering the full build command
syntax](build_command.md).
syntax](build_command.html).
Here, we'll just point out a few different types of arguments:

* You can specify a *package name*, e.g. `stack build vector`.
Expand Down Expand Up @@ -1163,7 +1165,7 @@ In addition to local directories, you can also refer to packages available in a
Git repository or in a tarball over HTTP/HTTPS. This can be useful for using a
modified version of a dependency that hasn't yet been released upstream. This is
a slightly more advanced usage that we won't go into detail with here, but it's
covered in the [stack.yaml documentation](yaml_configuration.md#packages).
covered in the [stack.yaml documentation](yaml_configuration.html#packages).

## Flags and GHC options

Expand Down Expand Up @@ -1251,7 +1253,7 @@ confusion.
Final point: if you have GHC options that you'll be regularly passing to your
packages, you can add them to your stack.yaml file (starting with
stack-0.1.4.0). See [the documentation section on
ghc-options](yaml_configuration.md#ghc-options)
ghc-options](yaml_configuration.html#ghc-options)
for more information.

## path
Expand Down Expand Up @@ -1509,9 +1511,9 @@ There are lots of resources available for learning more about stack:
* `stack --help`
* `stack --version` — identify the version and Git hash of the stack executable
* `--verbose` (or `-v`) — much more info about internal operations (useful for bug reports)
* The [README](https://github.com/commercialhaskell/stack#readme)
* The [home page](http://haskellstack.org)
* The [stack mailing list](https://groups.google.com/d/forum/haskell-stack)
* The [the FAQ](faq.md)
* The [the FAQ](faq.html)
* The [stack wiki](https://github.com/commercialhaskell/stack/wiki)
* The [haskell-stack tag on Stack Overflow](http://stackoverflow.com/questions/tagged/haskell-stack)
* [Another getting started with stack tutorial](http://seanhess.github.io/2015/08/04/practical-haskell-getting-started.html)
Expand Down Expand Up @@ -1568,7 +1570,7 @@ getting type information in Emacs. For more information, see
If you'd like to get some insight into the dependency tree of your packages, you
can use the `stack dot` command and Graphviz. More information is
[available in the Dependency visualization documentation](dependency_visualization.md).
[available in the Dependency visualization documentation](dependency_visualization.html).
### Travis with caching
Expand Down Expand Up @@ -1654,7 +1656,7 @@ code inside a Docker image, which means:
a large initial download, but much faster builds

For more information, see
[the Docker-integration documentation](docker_integration.md).
[the Docker-integration documentation](docker_integration.html).

stack can also generate Docker images for you containing your built executables.
This feature is great for automating deployments from CI. This feature is not
Expand Down
Loading

0 comments on commit 4f2d1ed

Please sign in to comment.