Workspace rules (GHC binary distributions)
ghc_bindist
ghc_bindist(name, version, target, compiler_flags, ghcopts, haddock_flags, repl_ghci_args, cabalopts, locale, register)
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",
)
Attributes
name
|
required
A unique name for the repository. |
version
|
required
The desired GHC version. |
target
|
required |
compiler_flags
|
optional; default is None
|
ghcopts
|
optional; default is None
|
haddock_flags
|
optional; default is None
|
repl_ghci_args
|
optional; default is None
|
cabalopts
|
optional; default is None
|
locale
|
optional; default is None
|
register
|
optional; default is True
Whether to register the toolchains (must be set to False if bzlmod is enabled) |
haskell_register_ghc_bindists
haskell_register_ghc_bindists(version, compiler_flags, ghcopts, haddock_flags, repl_ghci_args, cabalopts, locale, register)
Register GHC binary distributions for all platforms as toolchains.
Attributes
version
|
optional; default is None
|
compiler_flags
|
optional; default is None
|
ghcopts
|
optional; default is None
|
haddock_flags
|
optional; default is None
|
repl_ghci_args
|
optional; default is None
|
cabalopts
|
optional; default is None
|
locale
|
optional; default is None
|
register
|
optional; default is True
Whether to register the toolchains (must be set to False if bzlmod is enabled) |