Skip to content

Commit d63bfde

Browse files
authored
Merge pull request #2122 from tweag/philipp/use_stack-documentation
fix `use_stack` documentation
2 parents ef9eba2 + ef1ddd8 commit d63bfde

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

haskell/cabal.bzl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,7 +2746,8 @@ def use_stack(stack):
27462746
Globally override the `stack` version used by all instances of `stack_snapshot`.
27472747
WARNING: This should only be used in the top-level repository.
27482748
2749-
Example:
2749+
### Examples
2750+
```
27502751
# WORKSPACE
27512752
27522753
# Order is important! Placing `use_stack()` after any occurrence of `stack_snapshot`
@@ -2758,13 +2759,16 @@ def use_stack(stack):
27582759
stack = "@y_stack:stack",
27592760
# ...
27602761
)
2762+
```
27612763
2762-
# BUILD
2764+
```
2765+
# BUILD.bazel
27632766
haskell_binary(
27642767
# ...
27652768
# targets in `x` will be built using `x_stack`, NOT `y_stack`
27662769
deps = ["@x//:all"],
27672770
)
2771+
```
27682772
"""
27692773
if native.existing_rule("rules_haskell_stack"):
27702774
fail("`rules_haskell_stack` already defined. call `use_stack()` before `stack_snapshot()` in `WORKSPACE`")

0 commit comments

Comments
 (0)