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-09 20:52:39 +03:00
|
|
|
rules_haskell_toolchains(version = "8.8.1")
|
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-05-26 23:30:05 +03:00
|
|
|
# load("@rules_haskell//haskell:doctest.bzl", "haskell_doctest_toolchain")
|
2020-05-22 02:24:56 +03:00
|
|
|
|
2020-05-26 23:30:05 +03:00
|
|
|
# register_toolchains("//:doctest")
|
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-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",
|
|
|
|
"attoparsec",
|
2020-05-19 19:16:16 +03:00
|
|
|
"bytestring",
|
|
|
|
"containers",
|
2020-05-19 19:52:01 +03:00
|
|
|
"deepseq",
|
|
|
|
"directory",
|
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",
|
|
|
|
"fused-effects-readline",
|
|
|
|
"fused-syntax",
|
2020-05-19 20:07:33 +03:00
|
|
|
"generic-lens",
|
2020-05-19 19:16:16 +03:00
|
|
|
"generic-monoid",
|
|
|
|
"hashable",
|
2020-05-19 19:52:01 +03:00
|
|
|
"haskeline",
|
|
|
|
"hedgehog",
|
2020-05-19 20:07:33 +03:00
|
|
|
"lens",
|
2020-05-19 19:52:01 +03:00
|
|
|
"optparse-applicative",
|
2020-05-19 20:00:56 +03:00
|
|
|
"parsers",
|
2020-06-09 20:52:39 +03:00
|
|
|
"pathtype",
|
2020-05-19 19:52:01 +03:00
|
|
|
"pretty-simple",
|
|
|
|
"prettyprinter",
|
|
|
|
"prettyprinter-ansi-terminal",
|
2020-05-19 19:16:16 +03:00
|
|
|
"semilattices",
|
2020-05-19 19:52:01 +03:00
|
|
|
"tasty",
|
|
|
|
"tasty-hedgehog",
|
|
|
|
"tasty-hunit",
|
|
|
|
"template-haskell",
|
|
|
|
"terminal-size",
|
2020-05-19 19:16:16 +03:00
|
|
|
"text",
|
|
|
|
"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-09 20:52:39 +03:00
|
|
|
"tree-sitter-typescript",
|
|
|
|
"trifecta",
|
2020-05-19 19:52:01 +03:00
|
|
|
"unordered-containers",
|
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-05-26 23:30:05 +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"])
|
|
|
|
# """,
|
|
|
|
# strip_prefix="doctest-0.16.3",
|
|
|
|
# sha256="cfe9629f9c4d0aa24a11b5c4dd216fb5b9ebce7b3f6a8a7e58716280943a34f8",
|
|
|
|
# urls=["http://hackage.haskell.org/package/doctest-0.16.3/doctest-0.16.3.tar.gz"],
|
|
|
|
# )
|