@@ -144,6 +144,7 @@ def _cabal_tool_flag(tool):
144144 """Return a --with-PROG=PATH flag if input is a recognized Cabal tool. None otherwise."""
145145 if tool .basename in _CABAL_TOOLS :
146146 return "--with-{}={}" .format (tool .basename , tool .path )
147+ return None
147148
148149def _binary_paths (binaries ):
149150 return [binary .dirname for binary in binaries .to_list ()]
@@ -2333,13 +2334,13 @@ _stack_update = repository_rule(
23332334 # Marked as local so that stack update is always executed before
23342335 # _stack_snapshot is executed.
23352336 local = True ,
2336- )
2337- """Execute stack update.
2337+ doc = """Execute stack update.
23382338
23392339This is extracted into a singleton repository rule to avoid concurrent
23402340invocations of stack update.
23412341See https://github.com/tweag/rules_haskell/issues/1090
2342- """
2342+ """ ,
2343+ )
23432344
23442345def _get_platform (repository_ctx ):
23452346 """Map OS name and architecture to Stack platform identifiers."""
@@ -2387,8 +2388,8 @@ def _fetch_stack_impl(repository_ctx):
23872388 if not error :
23882389 repository_ctx .symlink (stack_cmd , "stack" )
23892390 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
23922393 (os , arch ) = _get_platform (repository_ctx )
23932394 version = _STACK_DEFAULT_VERSION
23942395 (url , sha256 ) = _STACK_BINDISTS [version ]["{}-{}" .format (os , arch )]
@@ -2424,8 +2425,9 @@ _fetch_stack = repository_rule(
24242425 _fetch_stack_impl ,
24252426 configure = True ,
24262427 environ = ["PATH" ],
2428+ doc =
2429+ """Find a suitably recent local Stack or download it.""" ,
24272430)
2428- """Find a suitably recent local Stack or download it."""
24292431
24302432def stack_snapshot (
24312433 name ,
0 commit comments