Skip to content

Commit

Permalink
Tentative fix for azure CI
Browse files Browse the repository at this point in the history
  • Loading branch information
guibou committed Jun 26, 2019
1 parent 2038ba1 commit 342be04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions hazel/ghc_paths.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ def _ghc_paths_module_impl(ctx):
inputs = [ghc],
outputs = [ctx.outputs.out],
command = """
{ghc} --print-libdir
{ghc} --print-libdir | sed 's:\\\\:/:g'
cat > {out} << EOM
module GHC.Paths (
ghc, ghc_pkg, libdir, docdir
) where
libdir, docdir, ghc, ghc_pkg :: FilePath
poulet = "$({ghc} --print-libdir)"
libdir = "$({ghc} --print-libdir | sed 's:\\\\:/:g')"
docdir = "DOCDIR_IS_NOT_SET"
Expand Down
4 changes: 2 additions & 2 deletions hazel/test/ghc-paths-test.hs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module Main where

import Control.Monad (when)
import GHC.Paths (ghc, ghc_pkg, libdir, docdir)
import GHC.Paths (ghc, ghc_pkg, libdir, docdir, poulet)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)

main :: IO ()
main = do
let require name value =
when (null value) $ do
hPutStrLn stderr (name ++ " should not be empty")
hPutStrLn stderr (name ++ " should not be empty" ++ poulet)
exitFailure
require "ghc" ghc
require "ghc_pkg" ghc_pkg
Expand Down

0 comments on commit 342be04

Please sign in to comment.