haskell_binary()
This is liable to change in the future.
Ahaskell_binary() rule represents a groups of Haskell sources and deps which build an executable.Arguments
name(required) #The short name for this build target.
main(defaults toNone) #The main module serving as the entry point into the binary. If not specified, the compiler default is used.
link_style(defaults tostatic) #Determines whether to build and link this rule's dependencies statically or dynamically. Can be either
static,static_picorshared.srcs(defaults to[]) #A list of Haskell sources to be built by this rule.
compiler_flags(defaults to[]) #Flags to pass to the Haskell compiler when compiling this rule's sources.
deps(defaults to[]) #Either
haskell_libraryorprebuilt_haskell_libraryrules from which this rules sources import modules or native linkable rules exporting symbols this rules sources call into.platform_deps(defaults to[]) #Platform specific dependencies. These should be specified as a list of pairs where the first element is an un-anchored regex (in java.util.regex.Pattern syntax) against which the platform name is matched, and the second element is a list of dependencies (same format as
deps) that are exported if the platform matches the regex. Seedepsfor more information.visibility(defaults to[]) #List of build target patterns that identify the build rules that can include this rule as a dependency, for example, by listing it in their
depsorexported_depsattributes. For more information, see visibility.licenses(defaults to[]) #Set of license files for this library. To get the list of license files for a given build rule and all of its dependencies, you can use
buck query.labels(defaults to[]) #Set of arbitrary strings which allow you to annotate a build rule with tags that can be searched for over an entire dependency tree using
buck query attrfilter().
Examples
haskell_binary(
name = 'foo',
srcs = [
'Foo.hs',
],
)