File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -623,6 +623,11 @@ command line arguments. For example, to pass `'a single quoted string'`:
623
623
The content of single quotes is taken literally. Within single quotes, `''`
624
624
escapes a single quote.
625
625
626
+ !!! note "Runtime system (RTS) options"
627
+
628
+ RTS options must be quoted to prevent the RTS extracting them as its own
629
+ when the Stack executable is run.
630
+
626
631
### ` --exec ` option
627
632
628
633
` stack build --exec '<command> [<argument(s)>]' ` will run the specified command
@@ -700,6 +705,11 @@ command line arguments. For example, to pass `'a single quoted string'`:
700
705
The content of single quotes is taken literally. Within single quotes, `''`
701
706
escapes a single quote.
702
707
708
+ !!! note "Runtime system (RTS) options"
709
+
710
+ RTS options must be quoted to prevent the RTS extracting them as its own
711
+ when the Stack executable is run.
712
+
703
713
## Flags affecting GHC's behaviour
704
714
705
715
### ` --[no-]executable-profiling ` flag
Original file line number Diff line number Diff line change @@ -10,6 +10,36 @@ of the guide and the part on [configuration](../configure/index.md) provide
10
10
information about some of those features, organised as a reference guide. Some
11
11
of the features are complex and separate pages are dedicated to them.
12
12
13
+ ## stack command
14
+
15
+ Stack is usually used with one of its commands (see further below). However:
16
+
17
+ * ` stack ` , ` stack --help ` (or ` -h ` ) lists Stack's commands, and flags and
18
+ options common to those commands;
19
+
20
+ * ` stack <command> --help ` (or ` -h ` ) — provides help on the particular Stack
21
+ command, including flags and options specific to the command; and
22
+
23
+ * ` stack --version ` identifies the version and Git hash of the Stack executable.
24
+
25
+ !!! info "Runtime system (RTS) options"
26
+
27
+ The Stack executable is built by GHC with the `-rtsopts=some` option. This
28
+ means that the RTS extracts command-line arguments bracketed between `+RTS`
29
+ and `-RTS` as its own when Stack is run. Only the following RTS
30
+ options are available:
31
+
32
+ * `-?` (e.g. `stack +RTS -?`) causes the RTS to output information about
33
+ RTS options; and
34
+
35
+ * `--info` (e.g. `stack +RTS --info`) causes the RTS to output information
36
+ about the RTS.
37
+
38
+ To avoid the RTS extracting such command-line arguments as its own when
39
+ using Stack commands such as [`exec`](exec_command.md),
40
+ [`test`](test_command.md) or [`bench`](bench_command.md), see the
41
+ documentation for those commands.
42
+
13
43
## Stack commands (thematic)
14
44
15
45
### Setting up
You can’t perform that action at this time.
0 commit comments