ghcide/BUILD.bazel
Neil Mitchell e2e158a85d Move the ofInterest kicking around in the IDE (#1669)
* Move getFilesOfInterest into the IDE, and OfInterest out into DAML

* Have the IDE mode kick all active files each time

* Add a missing .cabal dependency

* Add a missing dependencies

* Use the right thing, if any files have parse errors, then don't worry

* Print messages to stderr rather than stdout

* Add a big warning that writing to stdout is a bad plan
2019-06-14 14:23:22 +00:00

94 lines
2.0 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",
"either",
"extra",
"filepath",
"hashable",
"haskell-lsp",
"haskell-lsp-types",
"mtl",
"network-uri",
"pretty",
"prettyprinter",
"rope-utf16-splay",
"safe-exceptions",
"sorted-list",
"shake",
"stm",
"syb",
"text",
"time",
"transformers",
"uniplate",
"unordered-containers",
"utf8-string",
"uri-encode",
]
da_haskell_library(
name = "haskell-ide-core",
srcs = glob(["src/**/*.hs"]),
hazel_deps = depends + [
"ghc-lib",
"ghc-lib-parser",
],
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",
],
src_strip_prefix = "src",
visibility = ["//visibility:public"],
deps = [
"//libs-haskell/prettyprinter-syntax",
],
)
da_haskell_binary(
name = "haskell-ide-core-demo",
srcs = glob(["test/**/*.hs"]),
hazel_deps = [
"base",
"containers",
"extra",
"filepath",
"ghc-paths",
"ghc",
"haskell-lsp",
"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