Skip to content
Snippets Groups Projects
Rodrigo Mesquita's avatar
Rodrigo Mesquita authored
1. Refactors the duplicated `buildExtraSources` function from `gbuild` and
    `buildOrReplLib` into a standalone monadic computation in the context of
    building a component. This refactor allows
    us to share the code for building an extra source amongst the two
    functions.

2. Creates a new module Distribution.Simple.GHC.Build.Modules which, in the
    same spirit as ...GHC.Build.ExtraModules, defines an action which builds
    all the Haskell modules of the component being built.

    This function clarifies and re-implements the logic of building Haskell
    modules in the different possible ways, while accounting for
    Template Haskell special "way requirements", which was previously
    duplicated in a non-obvious manner in gbuild and buildOrReplLib.

    The Note [Building Haskell modules accounting for TH] in that module
    explains the big picture, and the implementation is re-done in light of
    it.

3. Re-work the linker invocations, focusing on preserving existing
behaviour before simplifying or fixing bugs any further.

Fixes #9389.
2decb0e7
History

Cabal

Hackage version Stackage version Documentation Status IRC chat Matrix chat

This Cabal Git repository contains the following main packages:

The canonical upstream repository is located at https://github.com/haskell/cabal.

Ways to get the cabal-install binary

  1. GHCup (preferred): get GHCup using the directions on its website and run:

    ghcup install --set cabal latest
  2. Download from official website: the cabal-install binary download for your platform should contain the cabal executable.

Getting unreleased versions of cabal-install: gives you a chance to try out yet-unreleased features. Currently, we only provide binaries for x86_64 platforms.

  1. GitHub preview release built from the tip of the master branch: download from GitHub or use this GHCup command to install:

    ghcup install cabal -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar.gz head

    Replace "Linux" with "Windows" or "macOS" as appropriate.

  2. Even more cutting-edge binaries built from pull requests are always available from the Validate worklow page on GitHub, at the very bottom of the page.

Ways to build cabal-install for everyday use

  1. With cabal-install: if you have a pre-existing version of cabal-install, run:

    cabal install cabal-install

    to get the latest version of cabal-install. (You may want to cabal update first.)

  2. From Git: again with a pre-existing version of cabal-install, you can install the latest version from the Git repository. Clone the Git repository, move to its root, and run:

    cabal install --project-file=cabal.project.release cabal-install
  3. Bootstrapping: if you don't have a pre-existing version of cabal-install, look into the bootstrap directory.

Learn how to use cabal and get support

cabal comes with a thorough User Manual. If you are new to cabal and want to quickly learn the basics, check Getting Started With Haskell and Cabal.

Got questions? Ask in Haskell Matrix (online chat) or Haskell Discourse.

Build for hacking and contributing to cabal

Refer to CONTRIBUTING.md.