2019-04-04 11:33:38 +03:00
|
|
|
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-05-20 18:36:08 +03:00
|
|
|
load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_library")
|
|
|
|
load("@os_info//:os_info.bzl", "is_windows")
|
2019-04-04 11:33:38 +03:00
|
|
|
|
2019-05-15 13:21:21 +03:00
|
|
|
depends = [
|
|
|
|
"aeson",
|
|
|
|
"base",
|
|
|
|
"binary",
|
|
|
|
"bytestring",
|
|
|
|
"containers",
|
|
|
|
"deepseq",
|
|
|
|
"directory",
|
|
|
|
"either",
|
|
|
|
"extra",
|
|
|
|
"filepath",
|
|
|
|
"hashable",
|
|
|
|
"haskell-lsp",
|
|
|
|
"haskell-lsp-types",
|
|
|
|
"mtl",
|
2019-06-04 10:45:29 +03:00
|
|
|
"network-uri",
|
2019-05-15 13:21:21 +03:00
|
|
|
"pretty",
|
2019-06-03 17:19:30 +03:00
|
|
|
"rope-utf16-splay",
|
2019-05-15 13:21:21 +03:00
|
|
|
"safe-exceptions",
|
2019-05-28 15:18:59 +03:00
|
|
|
"sorted-list",
|
2019-05-15 13:21:21 +03:00
|
|
|
"shake",
|
|
|
|
"stm",
|
|
|
|
"syb",
|
|
|
|
"text",
|
|
|
|
"time",
|
|
|
|
"transformers",
|
|
|
|
"uniplate",
|
|
|
|
"unordered-containers",
|
|
|
|
"uri-encode",
|
|
|
|
]
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
da_haskell_library(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "haskell-ide-core",
|
|
|
|
srcs = glob(["src/**/*.hs"]),
|
2019-05-15 13:21:21 +03:00
|
|
|
hazel_deps = depends + [
|
2019-04-12 14:10:16 +03:00
|
|
|
"ghc-lib",
|
|
|
|
"ghc-lib-parser",
|
2019-05-15 13:21:21 +03:00
|
|
|
],
|
|
|
|
src_strip_prefix = "src",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//libs-haskell/prettyprinter-syntax",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
da_haskell_library(
|
|
|
|
name = "haskell-ide-core-public",
|
|
|
|
srcs = glob(["src/**/*.hs"]),
|
|
|
|
compiler_flags = ["-DGHC_STABLE"],
|
|
|
|
hazel_deps = depends + [
|
|
|
|
"ghc",
|
|
|
|
"ghc-boot",
|
|
|
|
"ghc-boot-th",
|
2019-04-12 14:10:16 +03:00
|
|
|
],
|
|
|
|
src_strip_prefix = "src",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//libs-haskell/prettyprinter-syntax",
|
|
|
|
],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
2019-05-20 18:36:08 +03:00
|
|
|
|
|
|
|
da_haskell_binary(
|
|
|
|
name = "haskell-ide-core-demo",
|
|
|
|
srcs = glob(["test/**/*.hs"]),
|
|
|
|
hazel_deps = [
|
|
|
|
"base",
|
|
|
|
"containers",
|
|
|
|
"extra",
|
|
|
|
"filepath",
|
|
|
|
"ghc-paths",
|
|
|
|
"ghc",
|
2019-06-11 17:03:44 +03:00
|
|
|
"haskell-lsp",
|
2019-05-20 18:36:08 +03:00
|
|
|
"shake",
|
|
|
|
"text",
|
|
|
|
],
|
|
|
|
main_function = "Demo.main",
|
|
|
|
src_strip_prefix = "test",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"haskell-ide-core-public",
|
|
|
|
"//libs-haskell/prettyprinter-syntax",
|
|
|
|
],
|
|
|
|
) if not is_windows else None # Disable on Windows until ghc-paths is fixed upstream
|