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
66
third_party/bazel/rules_haskell/tests/failures/transitive-deps/BUILD.bazel
vendored
Normal file
66
third_party/bazel/rules_haskell/tests/failures/transitive-deps/BUILD.bazel
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
load(
|
||||
"@io_tweag_rules_haskell//haskell:haskell.bzl",
|
||||
"haskell_library",
|
||||
)
|
||||
|
||||
package(default_testonly = 1)
|
||||
|
||||
haskell_library(
|
||||
name = "lib-a",
|
||||
srcs = ["LibA.hs"],
|
||||
deps = ["//tests/hackage:base"],
|
||||
)
|
||||
|
||||
haskell_library(
|
||||
name = "lib-b",
|
||||
srcs = ["LibB.hs"],
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
":lib-a",
|
||||
"//tests/hackage:base",
|
||||
],
|
||||
)
|
||||
|
||||
# Targets that must FAIL. These are tagged as manual so that
|
||||
#
|
||||
# $ bazel build //...
|
||||
#
|
||||
# does not fail.
|
||||
|
||||
haskell_library(
|
||||
# Should fail because it doesn't specify "base" explicitly.
|
||||
name = "lib-cFailure",
|
||||
srcs = ["LibC.hs"],
|
||||
tags = ["manual"],
|
||||
deps = [":lib-b"],
|
||||
)
|
||||
|
||||
haskell_library(
|
||||
name = "lib-c",
|
||||
srcs = ["LibC.hs"],
|
||||
deps = [
|
||||
":lib-b",
|
||||
"//tests/hackage:base",
|
||||
],
|
||||
)
|
||||
|
||||
haskell_library(
|
||||
# Should fail because it doesn't specify "lib-a" explicitly.
|
||||
name = "lib-dFailure",
|
||||
srcs = ["LibD.hs"],
|
||||
tags = ["manual"],
|
||||
deps = [
|
||||
":lib-b",
|
||||
"//tests/hackage:base",
|
||||
],
|
||||
)
|
||||
|
||||
haskell_library(
|
||||
name = "lib-d",
|
||||
srcs = ["LibD.hs"],
|
||||
deps = [
|
||||
":lib-a",
|
||||
":lib-b",
|
||||
"//tests/hackage:base",
|
||||
],
|
||||
)
|
||||
4
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibA.hs
vendored
Normal file
4
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibA.hs
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
module LibA (thingA) where
|
||||
|
||||
thingA :: Int
|
||||
thingA = 5
|
||||
6
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibB.hs
vendored
Normal file
6
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibB.hs
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module LibB (thingB) where
|
||||
|
||||
import LibA (thingA)
|
||||
|
||||
thingB :: Int
|
||||
thingB = thingA + 1
|
||||
6
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibC.hs
vendored
Normal file
6
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibC.hs
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
module LibC (thingC) where
|
||||
|
||||
import LibB (thingB)
|
||||
|
||||
thingC :: Int
|
||||
thingC = thingB * 2
|
||||
7
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibD.hs
vendored
Normal file
7
third_party/bazel/rules_haskell/tests/failures/transitive-deps/LibD.hs
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
module LibD (thingD) where
|
||||
|
||||
import LibA (thingA)
|
||||
import LibB (thingB)
|
||||
|
||||
thingD :: Int
|
||||
thingD = thingA + thingB
|
||||
Loading…
Add table
Add a link
Reference in a new issue