about summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/examples/rts
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/bazel/rules_haskell/examples/rts')
-rw-r--r--third_party/bazel/rules_haskell/examples/rts/BUILD.bazel29
-rw-r--r--third_party/bazel/rules_haskell/examples/rts/One.hs6
-rw-r--r--third_party/bazel/rules_haskell/examples/rts/main.c11
3 files changed, 0 insertions, 46 deletions
diff --git a/third_party/bazel/rules_haskell/examples/rts/BUILD.bazel b/third_party/bazel/rules_haskell/examples/rts/BUILD.bazel
deleted file mode 100644
index 1bbf94b1c0a9..000000000000
--- a/third_party/bazel/rules_haskell/examples/rts/BUILD.bazel
+++ /dev/null
@@ -1,29 +0,0 @@
-load(
-    "@io_tweag_rules_haskell//haskell:haskell.bzl",
-    "cc_haskell_import",
-    "haskell_library",
-    "haskell_toolchain_library",
-)
-
-haskell_toolchain_library(name = "base")
-
-haskell_library(
-    name = "add-one-hs",
-    srcs = ["One.hs"],
-    deps = [":base"],
-)
-
-cc_haskell_import(
-    name = "add-one-so",
-    dep = ":add-one-hs",
-)
-
-cc_test(
-    name = "add-one",
-    srcs = [
-        "main.c",
-        ":add-one-so",
-    ],
-    visibility = ["//visibility:public"],
-    deps = ["@ghc//:threaded-rts"],
-)
diff --git a/third_party/bazel/rules_haskell/examples/rts/One.hs b/third_party/bazel/rules_haskell/examples/rts/One.hs
deleted file mode 100644
index bc24fb7cb274..000000000000
--- a/third_party/bazel/rules_haskell/examples/rts/One.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-module One () where
-
-add_one_hs :: Int -> Int
-add_one_hs x = x + 1
-
-foreign export ccall add_one_hs :: Int -> Int
diff --git a/third_party/bazel/rules_haskell/examples/rts/main.c b/third_party/bazel/rules_haskell/examples/rts/main.c
deleted file mode 100644
index 28624227d8c0..000000000000
--- a/third_party/bazel/rules_haskell/examples/rts/main.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-#include "HsFFI.h"
-
-extern HsInt add_one_hs(HsInt a0);
-
-int main(int argc, char *argv[]) {
-  hs_init(&argc, &argv);
-  printf("Adding one to 5 through Haskell is %ld\n", add_one_hs(5));
-  hs_exit();
-  return 0;
-}