[Haskell-cafe] Version constraints and cabal.config files

Miëtek Bak mietek at bak.io
Wed Mar 25 12:02:33 UTC 2015

On 2015-03-25, at 11:40, Michael Snoyman <michael at fpcomplete.com> wrote:

> Every Stackage Nightly and LTS Haskell release has a YAML file[1] that provides a lot of information, included the exact versions of packages and package dependencies. The stackage-types[2] package provides the datatypes necessary to parse that YAML file. Putting those two together, it should be possible to write something that looks at a project's list of shallow package dependencies, and construct a list of precisely which package-version combinations are necessary to build the entire project, which I think is what you're saying you get from cabal freeze but not from the current cabal.config on stackage.org.

If I understand correctly, the result should be equivalent to configuring `cabal-remote-repo` to point to a particular Stackage snapshot, running `cabal freeze`, and parsing its output.

Halcyon already does this — the following command will ignore any constraints declared by the application, and instead use the newest versions of all dependencies available in the specified Cabal repository:

$ halcyon install http://github.com/mietek/hello-yesod --ignore-all-constraints --cabal-remote-repo=stackage-lts-latest:http://www.stackage.org/lts

However, this means we’re using Stackage in “exclusive” mode.  I’d like to support using Stackage in “inclusive” mode, with `cabal-remote-repo` pointing to Hackage, and a Stackage-flavoured `cabal.config`.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4203 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150325/e31c5e7a/attachment.bin>

More information about the Haskell-Cafe mailing list