about summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tools/runfiles/bin/Bin.hs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/bazel/rules_haskell/tools/runfiles/bin/Bin.hs')
-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 0000000000..5bc90c70bc
--- /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