about summary refs log blame commit diff
path: root/third_party/bazel/rules_haskell/tools/runfiles/bin/Bin.hs
blob: 5bc90c70bc01cf7480a6e3293469f0eedb08d0df (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
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