What goes in a Stack package.yaml file?

haskell, haskell-stack

Solution

This is hpack, available here: https://github.com/sol/hpack

It's a slightly different package format, and, as you say, can be used to generate cabal files. It isn't directly tied to stack.

Problem

I notice that Stack supports using a `package.yaml` file that it will use to generate a `.cabal` file. For example, yi-core/package.yaml. Its structure seems very similar to a Cabal file, but not quite the same. Some of the keys have been renamed (for example, Stack uses `source-dirs` instead of `hs-source-dirs`). I haven't found any documentation on this feature. The Stack docs don't seem to mention `package.yaml` at all. Does a specification exist?

Original source