Skip to content

Commit 9d37bf4

Browse files
committed
Auto-fix warnings
1 parent 06284a6 commit 9d37bf4

File tree

13 files changed

+24
-28
lines changed

13 files changed

+24
-28
lines changed

haskell/experimental/private/module.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ def _build_haskell_module(
319319

320320
outputs = [module_outputs.hi, module_outputs.abi]
321321
if module_outputs.o:
322-
outputs += [module_outputs.o]
322+
outputs.append(module_outputs.o)
323323
if with_shared:
324-
outputs += [module_outputs.dyn_hi]
324+
outputs.append(module_outputs.dyn_hi)
325325
if module_outputs.dyn_o:
326-
outputs += [module_outputs.dyn_o]
326+
outputs.append(module_outputs.dyn_o)
327327

328328
input_files = [src] + extra_srcs + [optp_args_file]
329329
if enable_th and extra_ldflags_file:

haskell/private/actions/compile.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def _compilation_defaults(
194194
optp_args.add_all(cc.cpp_flags)
195195
optp_args.set_param_file_format("multiline")
196196
hs.actions.write(optp_args_file, optp_args)
197-
compile_flags += ["-optP@" + optp_args_file.path]
197+
compile_flags.append("-optP@" + optp_args_file.path)
198198

199199
compile_flags += cc.include_args
200200

haskell/private/actions/runghc.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def build_haskell_runghc(
5353

5454
if lib_info != None:
5555
for idir in sets.to_list(hs_info.import_dirs):
56-
args += ["-i{0}".format(idir)]
56+
args.append("-i{0}".format(idir))
5757

5858
link_libraries(
5959
get_ghci_library_files(hs, cc.cc_libraries_info, cc.cc_libraries),

haskell/private/cc_wrapper.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def cc_wrapper(name, **kwargs):
125125
# See https://github.com/bazelbuild/bazel/issues/8981
126126
# In principle the python cc_wrapper would be sufficient for all platforms,
127127
# however, execution is too slow on Windows to be practical.
128-
native.sh_binary(
128+
sh_binary(
129129
name = name + "-bash",
130130
srcs = [name + ".sh"],
131131
deps = [

haskell/repl.bzl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ def _create_HaskellReplCollectInfo(target, dep_labels, dep_package_ids, dep_pack
258258
java_deps_list = []
259259

260260
if hasattr(ctx.rule.attr, "deps"):
261-
java_deps_list += [java_interop_info(ctx.rule.attr.deps).inputs]
261+
java_deps_list.append(java_interop_info(ctx.rule.attr.deps).inputs)
262262

263263
# TODO[GL]: add tests for the java deps in narrowed_deps
264264
if hasattr(ctx.rule.attr, "narrowed_deps"):
265-
java_deps_list += [java_interop_info(ctx.rule.attr.narrowed_deps).inputs]
265+
java_deps_list.append(java_interop_info(ctx.rule.attr.narrowed_deps).inputs)
266266

267267
java_deps = depset(transitive = java_deps_list)
268268

@@ -1227,8 +1227,7 @@ information.
12271227
multi = multi,
12281228
**kwargs
12291229
)
1230-
1231-
native.sh_binary(
1230+
sh_binary(
12321231
name = hie_bios_runnable_target_name,
12331232
srcs = [
12341233
hie_bios_script_name,

haskell/toolchain.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _run_ghc(
7777
tools = [hs.worker]
7878
else:
7979
args.add(hs.tools.ghc)
80-
extra_inputs += [hs.tools.ghc]
80+
extra_inputs.append(hs.tools.ghc)
8181

8282
# XXX: We should also tether Bazel's CC toolchain to GHC's, so that we can properly mix Bazel-compiled
8383
# C libraries with Haskell targets.
@@ -117,7 +117,7 @@ def _run_ghc(
117117
unused_inputs_list = hs.actions.declare_file("unused_%s_%s" % (hs.name, extra_name))
118118

119119
extra_inputs += [show_iface_file, interface_with_abis_list]
120-
outputs += [unused_inputs_list]
120+
outputs.append(unused_inputs_list)
121121
env.update({"MUST_EXTRACT_ABI": "true"})
122122

123123
new_args = [show_iface_file.path, abi_file.path, interface_with_abis_list.path, unused_inputs_list.path]

rules_haskell_tests/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ load(
138138
haskell_register_ghc_bindists(
139139
cabalopts = test_cabalopts,
140140
dist = {
141-
"linux_amd64": "deb10",
141+
"linux_amd64": "deb10",
142142
},
143143
ghcopts = test_ghcopts,
144144
version = GHC_VERSION,

rules_haskell_tests/tests/multi_repl/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ haskell_repl(
2222

2323
haskell_repl(
2424
name = "d_unit_repl",
25-
deps = ["//tests/multi_repl/bc:d"],
2625
multi = True,
26+
deps = ["//tests/multi_repl/bc:d"],
2727
)
2828

2929
filegroup(

rules_haskell_tests/tests/multi_repl/a/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ package(default_visibility = ["//visibility:public"])
77

88
haskell_library(
99
name = "a",
10+
package_name = "a",
1011
srcs = [
1112
"src/A/A.hs",
1213
],
1314
src_strip_prefix = "src",
15+
version = "0.0.0",
1416
deps = [
1517
"//tests/hackage:base",
1618
],
17-
package_name = "a",
18-
version = "0.0.0",
1919
)
2020

2121
filegroup(

rules_haskell_tests/tests/multi_repl/bc/BUILD.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,44 @@ package(default_visibility = ["//visibility:public"])
77

88
haskell_library(
99
name = "b",
10+
package_name = "b",
1011
srcs = [
1112
"src-b/BC/B.hs",
1213
],
1314
src_strip_prefix = "src-b",
15+
version = "0.0.0",
1416
deps = [
1517
"//tests/hackage:base",
1618
"//tests/multi_repl/a",
1719
],
18-
package_name = "b",
19-
version = "0.0.0",
2020
)
2121

2222
haskell_library(
2323
name = "c",
24+
package_name = "c",
2425
srcs = [
2526
"src-c/BC/C.hs",
2627
],
2728
src_strip_prefix = "src-c",
29+
version = "0.0.0",
2830
deps = [
2931
":b",
3032
"//tests/hackage:base",
3133
],
32-
package_name = "c",
33-
version = "0.0.0",
3434
)
3535

3636
haskell_library(
3737
name = "d",
38+
package_name = "d",
3839
srcs = [
3940
"src-d/BC/D.hs",
4041
],
4142
src_strip_prefix = "src-d",
43+
version = "0.0.0",
4244
deps = [
4345
":c",
4446
"//tests/hackage:base",
4547
],
46-
package_name = "d",
47-
version = "0.0.0",
4848
)
4949

5050
filegroup(

0 commit comments

Comments
 (0)