2020-05-19 19:16:16 +03:00
|
|
|
# Give your project a name. :)
|
2020-06-09 20:52:39 +03:00
|
|
|
workspace(name = "semantic")
|
2020-05-19 19:16:16 +03:00
|
|
|
|
|
|
|
# Load the repository rule to download an http archive.
|
2020-05-22 02:24:56 +03:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
2020-05-19 19:16:16 +03:00
|
|
|
|
|
|
|
# Download rules_haskell and make it accessible as "@rules_haskell".
|
|
|
|
http_archive(
|
2020-06-09 20:52:39 +03:00
|
|
|
name = "rules_haskell",
|
|
|
|
sha256 = "56a8e6337df8802f1e0e7d2b3d12d12d5d96c929c8daecccc5738a0f41d9c1e4",
|
|
|
|
strip_prefix = "rules_haskell-0.12",
|
|
|
|
urls = ["https://github.com/tweag/rules_haskell/archive/v0.12.tar.gz"],
|
2020-05-19 19:16:16 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
load(
|
2020-06-09 20:52:39 +03:00
|
|
|
"@rules_haskell//haskell:repositories.bzl",
|
|
|
|
"rules_haskell_dependencies",
|
2020-05-19 19:16:16 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
# Setup all Bazel dependencies required by rules_haskell.
|
|
|
|
rules_haskell_dependencies()
|
|
|
|
|
|
|
|
load(
|
2020-06-09 20:52:39 +03:00
|
|
|
"@rules_haskell//haskell:toolchain.bzl",
|
|
|
|
"rules_haskell_toolchains",
|
2020-05-19 19:16:16 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
# Download a GHC binary distribution from haskell.org and register it as a toolchain.
|
2020-06-23 23:25:38 +03:00
|
|
|
rules_haskell_toolchains(version = "8.8.3")
|
2020-05-19 19:16:16 +03:00
|
|
|
|
|
|
|
load(
|
|
|
|
"@rules_haskell//haskell:cabal.bzl",
|
|
|
|
"haskell_cabal_binary",
|
2020-06-09 20:52:39 +03:00
|
|
|
"haskell_cabal_library",
|
|
|
|
"stack_snapshot",
|
2020-05-19 19:16:16 +03:00
|
|
|
)
|
2020-06-25 15:56:09 +03:00
|
|
|
load(
|
|
|
|
"@rules_haskell//haskell:defs.bzl",
|
|
|
|
"haskell_binary",
|
|
|
|
"haskell_library",
|
|
|
|
)
|
2020-06-26 20:07:24 +03:00
|
|
|
load(
|
|
|
|
"@bazel_tools//tools/build_defs/repo:git.bzl",
|
|
|
|
"git_repository",
|
|
|
|
)
|
2020-05-22 02:24:56 +03:00
|
|
|
|
2020-05-19 19:16:16 +03:00
|
|
|
stack_snapshot(
|
2020-06-09 20:52:39 +03:00
|
|
|
name = "stackage",
|
|
|
|
local_snapshot = "//:stack-snapshot.yaml",
|
|
|
|
packages = [
|
2020-05-19 19:52:01 +03:00
|
|
|
"Glob",
|
2020-06-10 07:18:25 +03:00
|
|
|
"HUnit",
|
2020-05-21 22:45:54 +03:00
|
|
|
"QuickCheck",
|
2020-05-19 19:16:16 +03:00
|
|
|
"aeson",
|
2020-05-19 19:52:01 +03:00
|
|
|
"aeson-pretty",
|
|
|
|
"algebraic-graphs",
|
2020-06-09 21:31:29 +03:00
|
|
|
"ansi-terminal",
|
|
|
|
"array",
|
2020-06-09 22:03:27 +03:00
|
|
|
"async",
|
2020-05-19 19:52:01 +03:00
|
|
|
"attoparsec",
|
2020-06-10 18:11:33 +03:00
|
|
|
"bazel-runfiles",
|
2020-06-09 21:31:29 +03:00
|
|
|
"bifunctors",
|
2020-05-19 19:52:01 +03:00
|
|
|
"deepseq",
|
|
|
|
"directory",
|
2020-06-09 21:31:29 +03:00
|
|
|
"directory-tree",
|
2020-05-21 22:24:16 +03:00
|
|
|
"doctest",
|
2020-05-19 19:16:16 +03:00
|
|
|
"filepath",
|
2020-05-19 19:52:01 +03:00
|
|
|
"fused-effects",
|
2020-06-09 21:31:29 +03:00
|
|
|
"fused-effects-exceptions",
|
2020-05-19 19:52:01 +03:00
|
|
|
"fused-effects-readline",
|
2020-06-09 21:31:29 +03:00
|
|
|
"fused-effects-resumable",
|
2020-05-19 19:52:01 +03:00
|
|
|
"fused-syntax",
|
2020-05-19 20:07:33 +03:00
|
|
|
"generic-lens",
|
2020-05-19 19:16:16 +03:00
|
|
|
"generic-monoid",
|
2020-06-09 21:31:29 +03:00
|
|
|
"gitrev",
|
2020-05-19 19:16:16 +03:00
|
|
|
"hashable",
|
2020-05-19 19:52:01 +03:00
|
|
|
"haskeline",
|
|
|
|
"hedgehog",
|
2020-06-09 21:31:29 +03:00
|
|
|
"hostname",
|
|
|
|
"hscolour",
|
2020-06-10 07:18:25 +03:00
|
|
|
"hspec",
|
|
|
|
"hspec-core",
|
|
|
|
"hspec-expectations",
|
2020-06-09 21:31:29 +03:00
|
|
|
"kdt",
|
2020-06-10 07:18:25 +03:00
|
|
|
"leancheck",
|
2020-05-19 20:07:33 +03:00
|
|
|
"lens",
|
2020-06-09 21:31:29 +03:00
|
|
|
"mersenne-random-pure64",
|
|
|
|
"network",
|
|
|
|
"network-uri",
|
2020-05-19 19:52:01 +03:00
|
|
|
"optparse-applicative",
|
2020-06-09 21:31:29 +03:00
|
|
|
"parallel",
|
2020-05-19 20:00:56 +03:00
|
|
|
"parsers",
|
2020-06-09 20:52:39 +03:00
|
|
|
"pathtype",
|
2020-06-09 21:31:29 +03:00
|
|
|
"pretty-show",
|
2020-05-19 19:52:01 +03:00
|
|
|
"pretty-simple",
|
|
|
|
"prettyprinter",
|
|
|
|
"prettyprinter-ansi-terminal",
|
2020-06-09 21:31:29 +03:00
|
|
|
"process",
|
|
|
|
"profunctors",
|
|
|
|
"proto-lens",
|
2020-06-09 21:56:19 +03:00
|
|
|
"proto-lens-jsonpb",
|
2020-06-09 21:31:29 +03:00
|
|
|
"proto-lens-runtime",
|
|
|
|
"recursion-schemes",
|
|
|
|
"reducers",
|
|
|
|
"safe-exceptions",
|
|
|
|
"scientific",
|
|
|
|
"semigroupoids",
|
2020-05-19 19:16:16 +03:00
|
|
|
"semilattices",
|
2020-06-09 21:31:29 +03:00
|
|
|
"split",
|
2020-06-09 22:20:08 +03:00
|
|
|
"stm-chans",
|
2020-06-09 21:31:29 +03:00
|
|
|
"streaming",
|
2020-05-19 19:52:01 +03:00
|
|
|
"tasty",
|
2020-06-10 07:18:25 +03:00
|
|
|
"tasty-golden",
|
2020-05-19 19:52:01 +03:00
|
|
|
"tasty-hedgehog",
|
2020-06-10 07:18:25 +03:00
|
|
|
"tasty-hspec",
|
2020-05-19 19:52:01 +03:00
|
|
|
"tasty-hunit",
|
|
|
|
"template-haskell",
|
2020-06-10 07:18:25 +03:00
|
|
|
"temporary",
|
2020-05-19 19:52:01 +03:00
|
|
|
"terminal-size",
|
2020-05-19 19:16:16 +03:00
|
|
|
"text",
|
2020-06-09 21:31:29 +03:00
|
|
|
"time",
|
2020-05-19 19:16:16 +03:00
|
|
|
"transformers",
|
2020-05-19 19:52:01 +03:00
|
|
|
"tree-sitter",
|
2020-06-09 20:52:39 +03:00
|
|
|
"tree-sitter-go",
|
|
|
|
"tree-sitter-java",
|
|
|
|
"tree-sitter-json",
|
|
|
|
"tree-sitter-php",
|
2020-05-19 19:52:01 +03:00
|
|
|
"tree-sitter-python",
|
2020-06-09 20:52:39 +03:00
|
|
|
"tree-sitter-ql",
|
2020-05-19 20:36:16 +03:00
|
|
|
"tree-sitter-ruby",
|
2020-06-26 20:07:24 +03:00
|
|
|
"tree-sitter-rust",
|
2020-06-09 21:31:29 +03:00
|
|
|
"tree-sitter-tsx",
|
2020-06-09 20:52:39 +03:00
|
|
|
"tree-sitter-typescript",
|
|
|
|
"trifecta",
|
2020-06-09 21:31:29 +03:00
|
|
|
"unix",
|
2020-06-09 22:20:08 +03:00
|
|
|
"unliftio-core",
|
2020-05-19 19:52:01 +03:00
|
|
|
"unordered-containers",
|
2020-06-09 21:31:29 +03:00
|
|
|
"vector",
|
2020-05-19 19:16:16 +03:00
|
|
|
],
|
2020-06-09 20:52:39 +03:00
|
|
|
tools = ["@happy"], # , "@doctest"],
|
2020-05-19 19:52:01 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
2020-06-09 20:52:39 +03:00
|
|
|
name = "happy",
|
|
|
|
build_file_content = """
|
2020-05-19 19:52:01 +03:00
|
|
|
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_binary")
|
|
|
|
haskell_cabal_binary(name = "happy", srcs = glob(["**"]), visibility = ["//visibility:public"])
|
|
|
|
""",
|
2020-06-09 20:52:39 +03:00
|
|
|
sha256 = "fb9a23e41401711a3b288f93cf0a66db9f97da1ce32ec4fffea4b78a0daeb40f",
|
|
|
|
strip_prefix = "happy-1.19.12",
|
|
|
|
urls = ["http://hackage.haskell.org/package/happy-1.19.12/happy-1.19.12.tar.gz"],
|
2020-05-22 02:24:56 +03:00
|
|
|
)
|
|
|
|
|
2020-06-23 21:54:32 +03:00
|
|
|
http_archive(
|
|
|
|
name = "doctest",
|
|
|
|
build_file_content = """
|
|
|
|
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_binary")
|
|
|
|
haskell_cabal_binary(name = "doctest", srcs = glob(["**"]), visibility = ["//visibility:public"])
|
|
|
|
""",
|
|
|
|
sha256 = "cfe9629f9c4d0aa24a11b5c4dd216fb5b9ebce7b3f6a8a7e58716280943a34f8",
|
|
|
|
strip_prefix = "doctest-0.16.3",
|
|
|
|
urls = ["http://hackage.haskell.org/package/doctest-0.16.3/doctest-0.16.3.tar.gz"],
|
|
|
|
)
|
2020-06-26 20:07:24 +03:00
|
|
|
|
|
|
|
load(
|
|
|
|
"//:build/common.bzl",
|
|
|
|
"tree_sitter_node_types_archive",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-python",
|
|
|
|
sha256 = "50d3fa560391dc4ab8d9a3466f68f2c6a4c12f9cc6421358d2c307023bd740ab",
|
|
|
|
version = "0.16.0",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-ruby",
|
|
|
|
sha256 = "1a63b43f82837a1194cab997475a22f82bfd820dd32999aa1444cfeae70f7596",
|
|
|
|
version = "0.16.2",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-php",
|
|
|
|
sha256 = "d7f6b7dbba359f5129f08647ad4cf73a599abdec443c2b0e2cdbbaee56cf3750",
|
|
|
|
version = "0.16.1",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-java",
|
|
|
|
sha256 = "1be7f9cfb2b85aece37979d1097fddf538b8984fb7726bf1edea4a7ce",
|
|
|
|
version = "0.16.0",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-json",
|
|
|
|
sha256 = "cbf0fefd2825a2db1770013111f49ec609c4fe090a8909e9780458629c22d1f4",
|
|
|
|
version = "0.16.0",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-rust",
|
|
|
|
sha256 = "8c34f19a9270ee60367ee235226ff1108341f944e0bd245cb47e1c2721f0c39b",
|
|
|
|
version = "0.16.1",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-go",
|
|
|
|
sha256 = "dc4de8a13b0f60407425d38c5cb3973e1938d3031a68e1e69bd0b75",
|
|
|
|
version = "0.16.1",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-typescript",
|
|
|
|
nodetypespath = "**/src/node-types.json",
|
|
|
|
sha256 = "3e1fc16daab965f21dc56a919b32a730e889ea2ba1330af5edc5950f4e6b18b6",
|
|
|
|
version = "0.16.2",
|
|
|
|
)
|
|
|
|
|
|
|
|
tree_sitter_node_types_archive(
|
|
|
|
name = "tree-sitter-ql",
|
|
|
|
nodetypespath = "src/node-types.json",
|
|
|
|
sha256 = "",
|
|
|
|
version = "1.1.0",
|
|
|
|
)
|