@@ -49,8 +49,8 @@ advantage of the flags is that they compose. See the examples below.
49
49
## Components
50
50
51
51
Every Cabal package is made up of one or more components. It can have an
52
- optional library component, one or more optional executable components, one or
53
- more optional test suite components, and one or more optional benchmark
52
+ optional public library component, one or more optional executable components,
53
+ one or more optional test suite components, and one or more optional benchmark
54
54
components.
55
55
56
56
Stack allows you to identify a specific component to be built. For example,
@@ -98,8 +98,10 @@ supported syntaxes for targets are:
98
98
test suites to run, or to have a faster compilation cycle. There are
99
99
multiple ways to refer to a specific component (provided for convenience):
100
100
101
- * ` packagename:comptype:compname ` is the most explicit. The available
102
- comptypes are ` exe ` , ` test ` , and ` bench ` .
101
+ * ` <package-name>:lib ` or ` <package-name>:<comp-type>:<comp-name> ` (where
102
+ the component type, ` <comp-type> ` , is one of ` exe ` , ` test ` , or ` bench ` )
103
+ is the most explicit. The library component type (` lib ` ) does not have
104
+ an associated component name, ` <comp-name> ` .
103
105
104
106
!!! note
105
107
@@ -108,14 +110,14 @@ supported syntaxes for targets are:
108
110
all currently released versions of Cabal. See
109
111
[issue#1046](https://github.com/commercialhaskell/stack/issues/1406)
110
112
111
- * ` packagename:compname ` allows you to leave out the component type, as
112
- that will (almost?) always be redundant with the component name. For
113
+ * ` <package-name>:<comp-name> ` allows you to leave out the component type,
114
+ as that will often be unique for a given component name. For
113
115
example, ` stack build mypackage:mytestsuite ` .
114
116
115
- * ` :compname ` is a useful shortcut, saying "find the component in all of
116
- the local packages." This will result in an error if multiple packages
117
- have a component with the same name. To continue the above example,
118
- ` stack build :mytestsuite ` .
117
+ * ` :<comp-name> ` is a useful shortcut, saying "find the component
118
+ ` <comp-name> ` in all of the local packages". This will result in an
119
+ error if more than one package has a component with the specified name.
120
+ To continue the above example, ` stack build :mytestsuite ` .
119
121
120
122
* * directory* , e.g. ` stack build foo/bar ` , will find all local packages that
121
123
exist in the given directory hierarchy and then follow the same procedure as
0 commit comments