Skip to content

jin/rules_haskell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rules_haskell

Haskell rules for Bazel.

Rules

Setup

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")

Rules

haskell_binary

Generates a Haskell binary.

haskell_binary(name, srcs, deps)

Example

haskell_binary(
    name = "main",
    srcs = ["Main.hs", "Other.hs"],
    deps = ["//lib:some_lib"]
)
Attributes
name

Name, required

A unique name for this target

srcs

List of labels, required

List of Haskell .hs source files used to build the binary

deps

List of labels, required

List of other Haskell libraries to be linked to this target

haskell_library

Generates a Haskell library.

haskell_library(name, srcs, deps)

Example

haskell_library(
    name = 'hello_lib',
    srcs = glob(['hello_lib/**/*.hs']),
    deps = ["//hello_sublib:lib"]
)
Attributes
name

Name, required

A unique name for this target

srcs

List of labels, required

List of Haskell .hs source files used to build the library

deps

List of labels, required

List of other Haskell libraries to be linked to this target

About

Haskell rules for Bazel.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.6%
  • Haskell 2.1%
  • Shell 0.3%