From f723b8b878a3c4a4687b9e337a875500bebb39b1 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 4 Jul 2019 11:18:12 +0100 Subject: feat(third_party/bazel): Check in rules_haskell from Tweag --- .../rules_haskell/tests/binary-with-sysdeps/BUILD.bazel | 17 +++++++++++++++++ .../rules_haskell/tests/binary-with-sysdeps/Main.hs | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 third_party/bazel/rules_haskell/tests/binary-with-sysdeps/BUILD.bazel create mode 100644 third_party/bazel/rules_haskell/tests/binary-with-sysdeps/Main.hs (limited to 'third_party/bazel/rules_haskell/tests/binary-with-sysdeps') diff --git a/third_party/bazel/rules_haskell/tests/binary-with-sysdeps/BUILD.bazel b/third_party/bazel/rules_haskell/tests/binary-with-sysdeps/BUILD.bazel new file mode 100644 index 000000000000..769ecf31a38c --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/binary-with-sysdeps/BUILD.bazel @@ -0,0 +1,17 @@ +load( + "@io_tweag_rules_haskell//haskell:haskell.bzl", + "haskell_test", +) + +package(default_testonly = 1) + +haskell_test( + name = "binary-with-sysdeps", + srcs = ["Main.hs"], + tags = ["requires_zlib"], + visibility = ["//visibility:public"], + deps = [ + "//tests/hackage:base", + "@zlib", + ], +) diff --git a/third_party/bazel/rules_haskell/tests/binary-with-sysdeps/Main.hs b/third_party/bazel/rules_haskell/tests/binary-with-sysdeps/Main.hs new file mode 100644 index 000000000000..bf8da504168a --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/binary-with-sysdeps/Main.hs @@ -0,0 +1,8 @@ +module Main where + +import Foreign.Ptr +import Foreign.C.Types + +foreign import ccall crc32 :: CLong -> Ptr () -> CInt -> IO () + +main = crc32 0 nullPtr 0 -- cgit 1.4.1