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/multi_repl/BUILD.bazel | 16 ++++++++++++ .../rules_haskell/tests/multi_repl/a/BUILD.bazel | 17 ++++++++++++ .../rules_haskell/tests/multi_repl/a/src/A/A.hs | 4 +++ .../rules_haskell/tests/multi_repl/bc/BUILD.bazel | 30 ++++++++++++++++++++++ .../rules_haskell/tests/multi_repl/bc/src/BC/B.hs | 6 +++++ .../rules_haskell/tests/multi_repl/bc/src/BC/C.hs | 6 +++++ 6 files changed, 79 insertions(+) create mode 100644 third_party/bazel/rules_haskell/tests/multi_repl/BUILD.bazel create mode 100644 third_party/bazel/rules_haskell/tests/multi_repl/a/BUILD.bazel create mode 100644 third_party/bazel/rules_haskell/tests/multi_repl/a/src/A/A.hs create mode 100644 third_party/bazel/rules_haskell/tests/multi_repl/bc/BUILD.bazel create mode 100644 third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/B.hs create mode 100644 third_party/bazel/rules_haskell/tests/multi_repl/bc/src/BC/C.hs (limited to 'third_party/bazel/rules_haskell/tests/multi_repl') 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 -- cgit 1.4.1