2020-05-19 20:00:56 +03:00
|
|
|
|
# Set all target’s visibility in this package to "public".
|
2020-05-27 21:18:21 +03:00
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
2020-05-19 20:00:56 +03:00
|
|
|
|
|
|
|
|
|
# Load rules_haskell rules.
|
|
|
|
|
load(
|
|
|
|
|
"@rules_haskell//haskell:defs.bzl",
|
|
|
|
|
"haskell_library",
|
2020-05-21 22:45:54 +03:00
|
|
|
|
"haskell_test",
|
2020-05-27 21:18:21 +03:00
|
|
|
|
"haskell_toolchain_library",
|
2020-05-19 20:00:56 +03:00
|
|
|
|
)
|
2020-05-22 02:24:56 +03:00
|
|
|
|
load(
|
2020-05-27 21:18:21 +03:00
|
|
|
|
"@rules_haskell//haskell:cabal.bzl",
|
|
|
|
|
"haskell_cabal_binary",
|
|
|
|
|
"haskell_cabal_library",
|
2020-05-22 02:24:56 +03:00
|
|
|
|
)
|
2020-06-23 16:45:10 +03:00
|
|
|
|
load(
|
|
|
|
|
"//:build/common.bzl",
|
2020-06-23 21:54:32 +03:00
|
|
|
|
"STANDARD_EXECUTABLE_FLAGS",
|
2020-06-23 16:45:10 +03:00
|
|
|
|
"STANDARD_GHC_WARNINGS",
|
|
|
|
|
)
|
2020-05-19 20:00:56 +03:00
|
|
|
|
|
|
|
|
|
# haskell_toolchain_library can access builtin GHC packages
|
|
|
|
|
# and assign them a bazel target name, so that they
|
|
|
|
|
# can be referenced as dependencies.
|
2020-05-27 21:18:21 +03:00
|
|
|
|
haskell_toolchain_library(name = "base")
|
2020-05-19 20:00:56 +03:00
|
|
|
|
|
|
|
|
|
# You can add your own libraries with haskell_library.
|
|
|
|
|
haskell_library(
|
2020-05-27 21:18:21 +03:00
|
|
|
|
name = "lib",
|
|
|
|
|
srcs = glob(["src/**/*.hs"]),
|
2020-06-23 16:45:10 +03:00
|
|
|
|
compiler_flags = STANDARD_GHC_WARNINGS,
|
2020-05-27 21:18:21 +03:00
|
|
|
|
deps = [
|
2020-05-19 20:00:56 +03:00
|
|
|
|
":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-22 02:24:56 +03:00
|
|
|
|
],
|
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(
|
2020-05-27 21:18:21 +03:00
|
|
|
|
name = "test",
|
|
|
|
|
srcs = glob([
|
|
|
|
|
"test/*.hs",
|
|
|
|
|
"test/Source/Test.hs",
|
|
|
|
|
]),
|
2020-06-23 21:54:32 +03:00
|
|
|
|
compiler_flags = STANDARD_GHC_WARNINGS + STANDARD_EXECUTABLE_FLAGS,
|
2020-05-27 21:18:21 +03:00
|
|
|
|
deps = [
|
2020-05-21 22:45:54 +03:00
|
|
|
|
":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
|
|
|
|
)
|