How to deal with package source code

In the latest Cabal docs there’s a new guide, How to deal with package source

  • It mentions how much Cabal works with source code behind the scenes.
  • It explains how to download a package .tar.gz archive from Hackage.
  • It shows how to take a dependency from a source code repository.
  • It picks apart the console logging when Cabal clones a Git repository.
  • It diagrams what source-repository and source-repository-package point to.
  • It compares and converts a source-repository into a source-repository-package.
  • It rates source-repository-package as easier to use than git submodule.
  • It encourages forking rather than vendoring dependencies in archive or unpacked form.
  • It warns that Cabal project files don’t declare dependencies.
  • It disambiguates “revision”, “commit” and “tag”.
  • It lists what “tag” gets you; when missing, for a branch, and for a commit.
  • It links to cabal sdist for creating a .tar.gz archive for publishing.