Build Haskell Using Bazel¶
Bazel is a tool for automating the building and the testing of software. Follow this guide to get started building small Haskell projects using Bazel. For a deeper dive and solutions to more advanced use cases, see Common Haskell Build Use Cases. Refer to the Bazel documentation for more about Bazel.
Requirements:
Bazel: See the start script for versions that are known to be compatible.
Contents:
- Is Bazel right for me?
- Introduction to Bazel: Building a Haskell project
- Common Haskell Build Use Cases
- Starting a new project
- Making rules_haskell available
- Picking a compiler
- Loading targets in a REPL
- Configuring IDE integration with ghcide
- Building Cabal packages
- Building Cabal packages (using Nix)
- Building incrementally
- Generating API documentation
- Linting your code
- Using conditional compilation
- Using source code pre-processors
- Checking code coverage
- Profiling
- Persistent Worker Mode (experimental)
- Building fully-statically-linked binaries
- Containerization with rules_docker
- Cross-compilation