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?
    • Rule of thumb
    • Rationale
  • Introduction to Bazel: Building a Haskell project
    • What you’ll learn
    • Before you begin
    • Build with Bazel
    • Refine your Bazel build
    • Use labels to reference targets
    • Further reading
  • 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

rules_haskell

Navigation

Contents:

  • Is Bazel right for me?
  • Introduction to Bazel: Building a Haskell project
  • Common Haskell Build Use Cases

Related Topics

  • Documentation overview
    • Next: Is Bazel right for me?

Quick search

©2018, The rules_haskell authors. | Page source
Fork me on GitHub