2020-05-19 20:00:56 +03:00
|
|
|
|
# Set all target’s visibility in this package to "public".
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
|
|
# Load rules_haskell rules.
|
|
|
|
|
load(
|
|
|
|
|
"@rules_haskell//haskell:defs.bzl",
|
|
|
|
|
"haskell_toolchain_library",
|
|
|
|
|
"haskell_library",
|
2020-05-21 22:45:54 +03:00
|
|
|
|
"haskell_test",
|
2020-05-19 20:00:56 +03:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_binary", "haskell_cabal_library")
|
|
|
|
|
|
|
|
|
|
# haskell_toolchain_library can access builtin GHC packages
|
|
|
|
|
# and assign them a bazel target name, so that they
|
|
|
|
|
# can be referenced as dependencies.
|
|
|
|
|
haskell_toolchain_library(name = "base")
|
|
|
|
|
|
|
|
|
|
# You can add your own libraries with haskell_library.
|
|
|
|
|
haskell_library(
|
|
|
|
|
name = "lib",
|
|
|
|
|
src_strip_prefix = "src",
|
|
|
|
|
srcs = glob(['src/**/*.hs']),
|
|
|
|
|
deps = [
|
|
|
|
|
":base",
|
|
|
|
|
"//semantic-analysis:lib",
|
|
|
|
|
"//semantic-source:lib",
|
|
|
|
|
"@stackage//:fused-effects",
|
|
|
|
|
"@stackage//:fused-syntax",
|
|
|
|
|
"@stackage//:hashable",
|
|
|
|
|
"@stackage//:parsers",
|
|
|
|
|
"@stackage//:pathtype",
|
|
|
|
|
"@stackage//:prettyprinter",
|
|
|
|
|
"@stackage//:prettyprinter-ansi-terminal",
|
|
|
|
|
"@stackage//:text",
|
|
|
|
|
"@stackage//:trifecta",
|
|
|
|
|
"@stackage//:unordered-containers",
|
|
|
|
|
]
|
2020-05-21 22:45:54 +03:00
|
|
|
|
)
|
2020-05-19 20:00:56 +03:00
|
|
|
|
|
2020-05-21 22:45:54 +03:00
|
|
|
|
haskell_test(
|
|
|
|
|
name = "test",
|
|
|
|
|
src_strip_prefix = "test",
|
|
|
|
|
srcs = glob(['test/*.hs', 'test/Source/Test.hs']),
|
|
|
|
|
deps = [
|
|
|
|
|
":base",
|
|
|
|
|
":lib",
|
|
|
|
|
"//semantic-analysis:lib",
|
|
|
|
|
"//semantic-source:lib",
|
|
|
|
|
"@stackage//:fused-effects",
|
|
|
|
|
"@stackage//:fused-syntax",
|
|
|
|
|
"@stackage//:hedgehog",
|
|
|
|
|
"@stackage//:tasty",
|
|
|
|
|
"@stackage//:tasty-hedgehog",
|
|
|
|
|
"@stackage//:tasty-hunit",
|
|
|
|
|
"@stackage//:text",
|
|
|
|
|
"@stackage//:trifecta",
|
|
|
|
|
],
|
2020-05-19 20:00:56 +03:00
|
|
|
|
)
|