feat(third_party/bazel): Check in rules_haskell from Tweag
This commit is contained in:
parent
2eb1dc26e4
commit
f723b8b878
479 changed files with 51484 additions and 0 deletions
36
third_party/bazel/rules_haskell/tests/cpp_macro_conflict/BUILD.bazel
vendored
Normal file
36
third_party/bazel/rules_haskell/tests/cpp_macro_conflict/BUILD.bazel
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
load(
|
||||
"@io_tweag_rules_haskell//haskell:haskell.bzl",
|
||||
"haskell_library",
|
||||
"haskell_test",
|
||||
)
|
||||
|
||||
package(default_testonly = 1)
|
||||
|
||||
# empty library with package name "bytestring"
|
||||
haskell_library(
|
||||
name = "bytestring",
|
||||
srcs = ["src/BS.hs"],
|
||||
deps = ["//tests/hackage:base"],
|
||||
)
|
||||
|
||||
# This depends on two packages "bytestring"
|
||||
# There should be no CPP macro conflict
|
||||
haskell_test(
|
||||
name = "macro_conflict",
|
||||
srcs = ["Main.hs"],
|
||||
compiler_flags = [
|
||||
"-XCPP",
|
||||
"-Werror",
|
||||
] + select({
|
||||
# clang on darwin fails because of unused command line argument, it fails because of -Werror
|
||||
"@bazel_tools//src/conditions:darwin": [
|
||||
"-optP-Wno-unused-command-line-argument",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [
|
||||
":bytestring",
|
||||
"//tests/hackage:base",
|
||||
"//tests/hackage:bytestring",
|
||||
],
|
||||
)
|
||||
4
third_party/bazel/rules_haskell/tests/cpp_macro_conflict/Main.hs
vendored
Normal file
4
third_party/bazel/rules_haskell/tests/cpp_macro_conflict/Main.hs
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import qualified Data.ByteString
|
||||
import BS
|
||||
|
||||
main = putStrLn "hello"
|
||||
1
third_party/bazel/rules_haskell/tests/cpp_macro_conflict/src/BS.hs
vendored
Normal file
1
third_party/bazel/rules_haskell/tests/cpp_macro_conflict/src/BS.hs
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
module BS where
|
||||
Loading…
Add table
Add a link
Reference in a new issue