Skip to content

@Profpatsch Profpatsch released this May 9, 2019


  • The minimum supported Bazel version is now v0.24.

    The version is available from nixpkgs unstable and via
    official releases.

  • Initial Windows support

    A non-trivial subset of rules_haskell is now working on Windows.
    See the project tracker
    for finished and ongoing work.

  • Improved OSX support

    Due to the mach-o header size limit, we took extra measures to
    make sure generated library paths are as short as possible, so
    linking haskell binaries works even for large dependency graphs.

  • Better Bindist support

    The default start script sets up a
    bindist-based project by default.

    rules_nixpkgs is no longer a required dependency of
    rules_haskell (but can still be used as backend).

  • Full Haskell–C–Haskell Sandwich

    A haskell_library can be now be used nearly anywhere a
    cc_library can.

    The old cc_haskell_import and haskell_cc_import wrapper rules
    are no longer necessary and have been deprecated.

  • Greatly improved REPL support

    A new haskell_repl rule allows to load multiple source targets by
    source, or compiled, as needed. Example usage:

      name = "my-repl",
      # Collect all transitive Haskell dependencies from these targets.
      deps = [
      # Load targets by source that match these patterns.
      include = [
      # Don't load targets by source that match these patterns.
      exclude = [
  • Support for GHC plugins

    Each haskell_* rule now has a plugins attribute. It takes a
    list of bazel targets, which should be haskell_librarys that
    implement the GHC plugin

  • Initial Code Coverage support

    Measure coverage of your Haskell code. See the “Checking Code

    section in the manual.

Compatibility Notice

hazel was merged into
, but
we are not yet certain about the exact interface we want to expose.
hazel is therefore not included in this release, and we can’t
guarantee the original, unmerged version is compatible with this
release. If you depend on hazel, please use a recent master commit
of rules_haskell.


  • haskell_register_ghc_bindists is no longer re-exported from
    You must now load that macro from //haskell:nixpkgs.bzl.

  • rules_nixpkgs is no longer a dependency of rules_haskell.

  • haskell_import has been renamed to haskell_toolchain_library.
    This is a substantial breaking change. But adapting to it should be
    as simple as

    sed -i 's/^haskell_import/haskell_toolchain_library/' **/BUILD{,.bazel}
    sed -i 's/"haskell_import"/"haskell_toolchain_library"/' **/BUILD{,.bazel}

    See #843.

  • haskell_toolchain’s tools attribute is now a list of labels.
    Earlier entries take precendence. To migrate, add [] around your
    See #854.

  • The default outputs of haskell_library are now the static and/or
    shared library files, not the package database config and cache


  • haskell_repl rule that constructs a ghci wrapper that loads
    multiple targets by source.
    See #736.
  • plugins attribute to haskell_* rules to load GHC plugins.
    See #799.
  • The HaskellInfo and HaskellLibraryInfo providers are now
    exported and thus accessible by downstream rules.
    See #844.
  • Generate version macros for preprocessors (c2hs, hsc2hs).
    See #847.
  • bindist_toolchain rule gets haddock_flags and repl_ghci_args
  • @repl targets write json file with build information, usable by
    IDE tools.
    See #695.


  • haskell_cc_import; use cc_library instead.
    See #831.
  • cc_haskell_import; just use haskell_library like a cc_library.
    See #831.


  • Support protobuf roots in haskell_proto_library.
    See #722.
  • Made GHC bindist relocatable on *nix.
    See #853.
  • Various other fixes
Assets 2
You can’t perform that action at this time.