@@ -144,6 +144,7 @@ def _cabal_tool_flag(tool):
144
144
"""Return a --with-PROG=PATH flag if input is a recognized Cabal tool. None otherwise."""
145
145
if tool .basename in _CABAL_TOOLS :
146
146
return "--with-{}={}" .format (tool .basename , tool .path )
147
+ return None
147
148
148
149
def _binary_paths (binaries ):
149
150
return [binary .dirname for binary in binaries .to_list ()]
@@ -2333,13 +2334,13 @@ _stack_update = repository_rule(
2333
2334
# Marked as local so that stack update is always executed before
2334
2335
# _stack_snapshot is executed.
2335
2336
local = True ,
2336
- )
2337
- """Execute stack update.
2337
+ doc = """Execute stack update.
2338
2338
2339
2339
This is extracted into a singleton repository rule to avoid concurrent
2340
2340
invocations of stack update.
2341
2341
See https://github.com/tweag/rules_haskell/issues/1090
2342
- """
2342
+ """ ,
2343
+ )
2343
2344
2344
2345
def _get_platform (repository_ctx ):
2345
2346
"""Map OS name and architecture to Stack platform identifiers."""
@@ -2387,8 +2388,8 @@ def _fetch_stack_impl(repository_ctx):
2387
2388
if not error :
2388
2389
repository_ctx .symlink (stack_cmd , "stack" )
2389
2390
return
2390
- print (error )
2391
- print ("Downloading Stack {} ..." .format (_STACK_DEFAULT_VERSION ))
2391
+ print (error ) # buildifier: disable=print
2392
+ print ("Downloading Stack {} ..." .format (_STACK_DEFAULT_VERSION )) # buildifier: disable=print
2392
2393
(os , arch ) = _get_platform (repository_ctx )
2393
2394
version = _STACK_DEFAULT_VERSION
2394
2395
(url , sha256 ) = _STACK_BINDISTS [version ]["{}-{}" .format (os , arch )]
@@ -2424,8 +2425,9 @@ _fetch_stack = repository_rule(
2424
2425
_fetch_stack_impl ,
2425
2426
configure = True ,
2426
2427
environ = ["PATH" ],
2428
+ doc =
2429
+ """Find a suitably recent local Stack or download it.""" ,
2427
2430
)
2428
- """Find a suitably recent local Stack or download it."""
2429
2431
2430
2432
def stack_snapshot (
2431
2433
name ,
0 commit comments