Haskell rules for Bazel.
Add the following to your WORKSPACE file, and select a $COMMIT accordingly.
git_repository(
name = "io_tweag_rules_haskell",
remote = "https://github.com/tweag/rules_haskell.git",
commit = "$COMMIT",
)and this to your BUILD files.
load("@io_tweag_rules_haskell//haskell:haskell.bzl", "haskell_binary", "haskell_library")Generates a Haskell binary.
haskell_binary(name, srcs, deps)haskell_binary(
name = "main",
srcs = ["Main.hs", "Other.hs"],
deps = ["//lib:some_lib"]
)| Attributes | |
|---|---|
name |
A unique name for this target |
srcs |
List of Haskell |
deps |
List of other Haskell libraries to be linked to this target |
Generates a Haskell library.
haskell_library(name, srcs, deps)haskell_library(
name = 'hello_lib',
srcs = glob(['hello_lib/**/*.hs']),
deps = ["//hello_sublib:lib"]
)| Attributes | |
|---|---|
name |
A unique name for this target |
srcs |
List of Haskell |
deps |
List of other Haskell libraries to be linked to this target |