summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tests/multi_repl
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/bazel/rules_haskell/tests/multi_repl')
-rw-r--r--third_party/bazel/rules_haskell/tests/multi_repl/BUILD.bazel16
-rw-r--r--third_party/bazel/rules_haskell/tests/multi_repl/a/BUILD.bazel17
-rw-r--r--third_party/bazel/rules_haskell/tests/multi_repl/a/src/A/A.hs4
-rw-r--r--third_party/bazel/rules_haskell/tests/multi_repl/bc/BUILD.bazel30
-rw-r--r--third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/B.hs6
-rw-r--r--third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/C.hs6
6 files changed, 79 insertions, 0 deletions
diff --git a/third_party/bazel/rules_haskell/tests/multi_repl/BUILD.bazel b/third_party/bazel/rules_haskell/tests/multi_repl/BUILD.bazel
new file mode 100644
index 000000000000..b2edce37ab0f
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/multi_repl/BUILD.bazel
@@ -0,0 +1,16 @@
+load(
+    "@io_tweag_rules_haskell//haskell:haskell.bzl",
+    "haskell_repl",
+)
+
+haskell_repl(
+    name = "c_only_repl",
+    # To only load :c by source.
+    experimental_from_source = ["//tests/multi_repl/bc:c"],
+    deps = ["//tests/multi_repl/bc:c"],
+)
+
+haskell_repl(
+    name = "c_multi_repl",
+    deps = ["//tests/multi_repl/bc:c"],
+)
diff --git a/third_party/bazel/rules_haskell/tests/multi_repl/a/BUILD.bazel b/third_party/bazel/rules_haskell/tests/multi_repl/a/BUILD.bazel
new file mode 100644
index 000000000000..7d17e834a9cd
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/multi_repl/a/BUILD.bazel
@@ -0,0 +1,17 @@
+package(default_visibility = ["//visibility:public"])
+
+load(
+    "@io_tweag_rules_haskell//haskell:haskell.bzl",
+    "haskell_library",
+)
+
+haskell_library(
+    name = "a",
+    srcs = [
+        "src/A/A.hs",
+    ],
+    src_strip_prefix = "src",
+    deps = [
+        "//tests/hackage:base",
+    ],
+)
diff --git a/third_party/bazel/rules_haskell/tests/multi_repl/a/src/A/A.hs b/third_party/bazel/rules_haskell/tests/multi_repl/a/src/A/A.hs
new file mode 100644
index 000000000000..92eb0e60759a
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/multi_repl/a/src/A/A.hs
@@ -0,0 +1,4 @@
+module A.A ( a ) where
+
+a :: ()
+a = ()
diff --git a/third_party/bazel/rules_haskell/tests/multi_repl/bc/BUILD.bazel b/third_party/bazel/rules_haskell/tests/multi_repl/bc/BUILD.bazel
new file mode 100644
index 000000000000..98372a4a1925
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/multi_repl/bc/BUILD.bazel
@@ -0,0 +1,30 @@
+package(default_visibility = ["//visibility:public"])
+
+load(
+    "@io_tweag_rules_haskell//haskell:haskell.bzl",
+    "haskell_library",
+)
+
+haskell_library(
+    name = "b",
+    srcs = [
+        "src/BC/B.hs",
+    ],
+    src_strip_prefix = "src",
+    deps = [
+        "//tests/hackage:base",
+        "//tests/multi_repl/a",
+    ],
+)
+
+haskell_library(
+    name = "c",
+    srcs = [
+        "src/BC/C.hs",
+    ],
+    src_strip_prefix = "src",
+    deps = [
+        ":b",
+        "//tests/hackage:base",
+    ],
+)
diff --git a/third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/B.hs b/third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/B.hs
new file mode 100644
index 000000000000..b86223c41ea7
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/B.hs
@@ -0,0 +1,6 @@
+module BC.B ( b ) where
+
+import A.A ( a )
+
+b :: ()
+b = a
diff --git a/third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/C.hs b/third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/C.hs
new file mode 100644
index 000000000000..6e6f31f0c80a
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/C.hs
@@ -0,0 +1,6 @@
+module BC.C ( c ) where
+
+import BC.B ( b )
+
+c :: ()
+c = b