Skip to content

Commit

Permalink
Use ghcopts instead of compiler_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Nov 20, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 9fc3e30 commit 7c01156
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/haskell.rst
Original file line number Diff line number Diff line change
@@ -239,7 +239,7 @@ a single ``BUILD.bazel`` as follows::
haskell_binary(
name = "demorgan",
srcs = ["Main.hs"],
compiler_flags = ["-threaded"],
ghcopts = ["-threaded"],
deps = [":base", ":booleans"],
)

@@ -317,7 +317,7 @@ And at the ``main/BUILD.bazel`` file::
haskell_binary(
name = "demorgan",
srcs = ["Main.hs"],
compiler_flags = ["-threaded"],
ghcopts = ["-threaded"],
deps = [":base", "//lib:booleans"],
)

4 changes: 2 additions & 2 deletions rules_haskell_tests/tests/repl-flags/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ haskell_test(
name = "compiler_flags",
srcs = ["CompilerFlags.hs"],

# This also ensure that local `compiler_flags` does not override the `global ones`
compiler_flags = ["-XOverloadedStrings"],
# This also ensure that local `ghcopts` does not override the `global ones`
ghcopts = ["-XOverloadedStrings"],
visibility = ["//visibility:public"],
deps = [
"//tests/hackage:base",
4 changes: 2 additions & 2 deletions rules_haskell_tests/tests/repl-make-variables/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@ package(default_testonly = 1)

# Regression tests for https://github.com/tweag/rules_haskell/issues/1377

# Test that make variable expension is performed on `compiler_flags` forwarded
# Test that make variable expension is performed on `ghcopts` forwarded
# to the REPL.
haskell_test(
name = "test-compiler-flags",
srcs = ["Main.hs"],
compiler_flags = ['-DDATA="$(rootpath data.txt)"'],
data = ["data.txt"],
ghcopts = ['-DDATA="$(rootpath data.txt)"'],
visibility = ["//tests/asterius/repl-make-variables:__pkg__"],
deps = [
"//tests/hackage:base",
4 changes: 2 additions & 2 deletions rules_haskell_tests/tests/sandwich/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ cc_library(
haskell_library(
name = "testlib",
srcs = ["Lib.hs"],
compiler_flags = [
ghcopts = [
"-Wall",
"-Werror",
],
@@ -28,7 +28,7 @@ haskell_library(
haskell_test(
name = "test",
srcs = ["Main.hs"],
compiler_flags = [
ghcopts = [
"-Wall",
"-Werror",
],

0 comments on commit 7c01156

Please sign in to comment.