about summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tools/runfiles/bin
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/bazel/rules_haskell/tools/runfiles/bin')
-rw-r--r--third_party/bazel/rules_haskell/tools/runfiles/bin/Bin.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/bazel/rules_haskell/tools/runfiles/bin/Bin.hs b/third_party/bazel/rules_haskell/tools/runfiles/bin/Bin.hs
new file mode 100644
index 000000000000..5bc90c70bc01
--- /dev/null
+++ b/third_party/bazel/rules_haskell/tools/runfiles/bin/Bin.hs
@@ -0,0 +1,12 @@
+module Main (main) where
+
+import qualified Bazel.Runfiles as Runfiles
+import Control.Monad (when)
+import System.FilePath ((</>))
+
+main :: IO ()
+main = do
+    r <- Runfiles.create
+    bar <- readFile (Runfiles.rlocation r "io_tweag_rules_haskell/tools/runfiles/bin-data.txt")
+    when (lines bar /= ["bar"]) -- ignore trailing newline
+        $ error $ "Incorrect contents: got: " ++ show bar