summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tests/package-id-clash-binary
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/bazel/rules_haskell/tests/package-id-clash-binary')
-rw-r--r--third_party/bazel/rules_haskell/tests/package-id-clash-binary/BUILD.bazel15
-rw-r--r--third_party/bazel/rules_haskell/tests/package-id-clash-binary/Main.hs6
-rw-r--r--third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/BUILD.bazel12
-rw-r--r--third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/Foo.hs3
-rw-r--r--third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/BUILD.bazel12
-rw-r--r--third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/Baz.hs3
6 files changed, 51 insertions, 0 deletions
diff --git a/third_party/bazel/rules_haskell/tests/package-id-clash-binary/BUILD.bazel b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/BUILD.bazel
new file mode 100644
index 000000000000..d64a8909c5f5
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/BUILD.bazel
@@ -0,0 +1,15 @@
+load(
+    "@io_tweag_rules_haskell//haskell:haskell.bzl",
+    "haskell_test",
+    "haskell_toolchain_library",
+)
+
+haskell_test(
+    name = "bin",
+    srcs = ["Main.hs"],
+    deps = [
+        "//tests/hackage:base",
+        "//tests/package-id-clash-binary/a:foo",
+        "//tests/package-id-clash-binary/b:foo",
+    ],
+)
diff --git a/third_party/bazel/rules_haskell/tests/package-id-clash-binary/Main.hs b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/Main.hs
new file mode 100644
index 000000000000..0c341e6f47d2
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/Main.hs
@@ -0,0 +1,6 @@
+module Main where
+
+import Foo
+import Baz
+
+main = print $ x + y
diff --git a/third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/BUILD.bazel b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/BUILD.bazel
new file mode 100644
index 000000000000..02c3a6b36d3f
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/BUILD.bazel
@@ -0,0 +1,12 @@
+load(
+    "@io_tweag_rules_haskell//haskell:haskell.bzl",
+    "haskell_library",
+    "haskell_toolchain_library",
+)
+
+haskell_library(
+    name = "foo",
+    srcs = ["Foo.hs"],
+    visibility = ["//visibility:public"],
+    deps = ["//tests/hackage:base"],
+)
diff --git a/third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/Foo.hs b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/Foo.hs
new file mode 100644
index 000000000000..ecac0701a07d
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/a/Foo.hs
@@ -0,0 +1,3 @@
+module Foo where
+
+x = 2
diff --git a/third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/BUILD.bazel b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/BUILD.bazel
new file mode 100644
index 000000000000..4bf734af5dd1
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/BUILD.bazel
@@ -0,0 +1,12 @@
+load(
+    "@io_tweag_rules_haskell//haskell:haskell.bzl",
+    "haskell_library",
+    "haskell_toolchain_library",
+)
+
+haskell_library(
+    name = "foo",
+    srcs = ["Baz.hs"],
+    visibility = ["//visibility:public"],
+    deps = ["//tests/hackage:base"],
+)
diff --git a/third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/Baz.hs b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/Baz.hs
new file mode 100644
index 000000000000..3159fda6b00a
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/package-id-clash-binary/b/Baz.hs
@@ -0,0 +1,3 @@
+module Baz where
+
+y = 2