about summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tests/indirect-link
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/bazel/rules_haskell/tests/indirect-link')
-rw-r--r--third_party/bazel/rules_haskell/tests/indirect-link/BUILD.bazel52
-rw-r--r--third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c9
-rw-r--r--third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c10
-rw-r--r--third_party/bazel/rules_haskell/tests/indirect-link/src/MyModule.hs11
-rw-r--r--third_party/bazel/rules_haskell/tests/indirect-link/test/Main.hs9
5 files changed, 0 insertions, 91 deletions
diff --git a/third_party/bazel/rules_haskell/tests/indirect-link/BUILD.bazel b/third_party/bazel/rules_haskell/tests/indirect-link/BUILD.bazel
deleted file mode 100644
index 60403a4ef2..0000000000
--- a/third_party/bazel/rules_haskell/tests/indirect-link/BUILD.bazel
+++ /dev/null
@@ -1,52 +0,0 @@
-load("@io_tweag_rules_haskell//haskell:haskell.bzl", "haskell_library", "haskell_test", "haskell_toolchain_library")
-
-cc_library(
-    name = "cbits-indirect",
-    srcs = ["cbits/impl.c"],
-)
-
-cc_library(
-    name = "cbits",
-    srcs = ["cbits/intf.c"],
-    deps = ["cbits-indirect"],
-)
-
-haskell_library(
-    name = "mypkg",
-    srcs = ["src/MyModule.hs"],
-    src_strip_prefix = "src",
-    deps = [
-        ":cbits",
-        "//tests/hackage:base",
-    ],
-)
-
-haskell_test(
-    name = "indirect-link-static",
-    srcs = ["test/Main.hs"],
-    linkstatic = True,
-    src_strip_prefix = "test",
-    deps = [
-        ":mypkg",
-        "//tests/hackage:base",
-    ],
-)
-
-haskell_test(
-    name = "indirect-link-dynamic",
-    srcs = ["test/Main.hs"],
-    linkstatic = False,
-    src_strip_prefix = "test",
-    deps = [
-        ":mypkg",
-        "//tests/hackage:base",
-    ],
-)
-
-test_suite(
-    name = "indirect-link",
-    tests = [
-        ":indirect-link-dynamic",
-        ":indirect-link-static",
-    ],
-)
diff --git a/third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c b/third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c
deleted file mode 100644
index 666ce43962..0000000000
--- a/third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c
+++ /dev/null
@@ -1,9 +0,0 @@
-static int thing;
-
-int real_get_thing(void) {
-  return thing;
-}
-
-void real_set_thing(int value) {
-  thing = value;
-}
diff --git a/third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c b/third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c
deleted file mode 100644
index f7a8f5e9f2..0000000000
--- a/third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c
+++ /dev/null
@@ -1,10 +0,0 @@
-extern int real_get_thing(void);
-extern void real_set_thing(int value);
-
-int get_thing(void) {
-  return real_get_thing();
-}
-
-void set_thing(int value) {
-  real_set_thing(value);
-}
diff --git a/third_party/bazel/rules_haskell/tests/indirect-link/src/MyModule.hs b/third_party/bazel/rules_haskell/tests/indirect-link/src/MyModule.hs
deleted file mode 100644
index 4b75cee139..0000000000
--- a/third_party/bazel/rules_haskell/tests/indirect-link/src/MyModule.hs
+++ /dev/null
@@ -1,11 +0,0 @@
-module MyModule where
-
-foreign import ccall get_thing :: IO Int
-
-getThing :: IO Int
-getThing = get_thing
-
-foreign import ccall set_thing :: Int -> IO ()
-
-setThing :: Int -> IO ()
-setThing = set_thing
diff --git a/third_party/bazel/rules_haskell/tests/indirect-link/test/Main.hs b/third_party/bazel/rules_haskell/tests/indirect-link/test/Main.hs
deleted file mode 100644
index 0b3d188d73..0000000000
--- a/third_party/bazel/rules_haskell/tests/indirect-link/test/Main.hs
+++ /dev/null
@@ -1,9 +0,0 @@
-module Main (main) where
-
-import qualified MyModule
-
-main :: IO ()
-main = do
-  print =<< MyModule.getThing
-  MyModule.setThing 123
-  print =<< MyModule.getThing