ghcide/BUILD.bazel
Neil Mitchell 44b40b5086 Hide some hie-core modules (#1987)
* Hide some hie-core modules

* Make bazelifier happy
2019-09-10 14:52:17 +02:00

113 lines
2.6 KiB
Python

# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_library")
load("@os_info//:os_info.bzl", "is_windows")
depends = [
"aeson",
"async",
"base",
"binary",
"bytestring",
"containers",
"data-default",
"deepseq",
"directory",
"extra",
"filepath",
"hashable",
"haskell-lsp",
"haskell-lsp-types",
"mtl",
"network-uri",
"prettyprinter",
"prettyprinter-ansi-terminal",
"rope-utf16-splay",
"safe-exceptions",
"sorted-list",
"shake",
"stm",
"syb",
"text",
"time",
"transformers",
"unordered-containers",
"utf8-string",
]
hidden = [
"Development.IDE.Core.Compile",
"Development.IDE.GHC.Compat",
"Development.IDE.GHC.CPP",
"Development.IDE.GHC.Error",
"Development.IDE.GHC.Orphans",
"Development.IDE.GHC.Warnings",
"Development.IDE.Import.FindImports",
"Development.IDE.LSP.CodeAction",
"Development.IDE.LSP.Definition",
"Development.IDE.LSP.Hover",
"Development.IDE.LSP.Notifications",
"Development.IDE.Spans.AtPoint",
"Development.IDE.Spans.Calculate",
"Development.IDE.Spans.Documentation",
"Development.IDE.Spans.Type",
]
da_haskell_library(
name = "hie-core",
srcs = glob(["src/**/*.hs"]),
hazel_deps = depends + [
"ghc-lib",
"ghc-lib-parser",
],
hidden_modules = hidden,
src_strip_prefix = "src",
visibility = ["//visibility:public"],
)
da_haskell_library(
name = "hie-core-public",
srcs = glob(["src/**/*.hs"]),
compiler_flags = ["-DGHC_STABLE"],
hazel_deps = depends + [
"ghc",
"ghc-boot",
"ghc-boot-th",
],
hidden_modules = hidden,
# Override the -hide-package flags defined in WORKSPACE
# -hide-package=ghc-boot-th -hide-package=ghc-boot
repl_ghci_args = [
"-package=ghc-boot",
"-package=ghc-boot-th",
],
src_strip_prefix = "src",
visibility = ["//visibility:public"],
)
da_haskell_binary(
name = "hie-core-exe",
srcs = glob(["exe/**/*.hs"]),
hazel_deps = [
"base",
"containers",
"data-default",
"directory",
"extra",
"filepath",
"ghc-paths",
"ghc",
"haskell-lsp",
"hie-bios",
"optparse-applicative",
"shake",
"text",
],
src_strip_prefix = "test",
visibility = ["//visibility:public"],
deps = [
"hie-core-public",
],
) if not is_windows else None # Disable on Windows until ghc-paths is fixed upstream