Workspace rules (GHC binary distributions)

Macros and Functions

ghc_bindist

Create a new repository from binary distributions of GHC.

The repository exports two targets:

  • a bin filegroup containing all GHC commands,
  • a threaded-rts CC library.

These targets are unpacked from a binary distribution specific to your platform. Only the platforms that have a "binary package" on the GHC download page are supported.

Examples

In WORKSPACE file:

load("@rules_haskell//haskell:ghc_bindist.bzl", "ghc_bindist")

# This repository rule creates @ghc repository.
ghc_bindist(
  name    = "ghc",
  version = "8.2.2",
)

name

A unique name for the repository.

version

The desired GHC version.

target

compiler_flags

see rules_haskell_toolchains

ghcopts

see rules_haskell_toolchains

haddock_flags

see rules_haskell_toolchains

repl_ghci_args

see rules_haskell_toolchains

cabalopts

see rules_haskell_toolchains

locale

see rules_haskell_toolchains


haskell_register_ghc_bindists

Register GHC binary distributions for all platforms as toolchains.

See rules_haskell_toolchains.

Example usage (generated)

load("@rules_haskell//haskell:ghc_bindist.bzl", "haskell_register_ghc_bindists")

haskell_register_ghc_bindists(
)

version

see rules_haskell_toolchains

compiler_flags

see rules_haskell_toolchains

ghcopts

see rules_haskell_toolchains

haddock_flags

see rules_haskell_toolchains

repl_ghci_args

see rules_haskell_toolchains

cabalopts

see rules_haskell_toolchains

locale

see rules_haskell_toolchains