commercialhaskell / commercialhaskell/stackage-server

Explain how to add a dependency, right on the package page

Open
#143 1 comment 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
108
Forks
31
PR merge metrics
No merged PRs in 30d

Description

The idea is to explain to users how to use a particular package:

> To use this package in your project, add `, aeson` to the `build-depends` field of your project's .cabal file. See [this page](http://stackage.org/some-page-documenting-it) for more details.
>
> ```
> build-depends:
> ...
> , aeson
> ...
> ```
>
> Some stackage snapshots include this package, such as the recent [lts-3.18](https://www.stackage.org/lts-3.18) and [nightly-2015-12-26](https://www.stackage.org/nightly-2015-12-26). If you aren't using a stack resolver that includes this package, such as `resolver: ghc-7.10.3`, then you will need to add `aeson-0.10.0.0` to your `stack.yaml`, like this:
>
> ``` yaml
> extra-deps:
> - aeson-0.10.0.0
> ```

The page documenting build depends should clarify how cabal version constraints work, and when you should have them in your cabal file (when it's intended for hackage). Also, it'd be nice to have some guidance on how to determine them. Another thing to clarify is that there are potentially multiple `build-depends` in a cabal file, one for each component, and it matters which one you choose (I've seen this trip people up).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.