@@ -35,8 +35,8 @@ command line.
35
35
36
36
The default Stack root is `%APPDIR%\stack`.
37
37
38
- If the `LOCALAPPDATA` environment variable exists, the default location of
39
- tools is `%LOCALAPPDATA%\Programs\stack`. Otherwise, it is the `programs`
38
+ If the `LOCALAPPDATA` environment variable exists, then the default location
39
+ of tools is `%LOCALAPPDATA%\Programs\stack`. Otherwise, it is the `programs`
40
40
directory in the Stack root.
41
41
42
42
!!! warning
@@ -144,14 +144,27 @@ This is Stack's global configuration file. For further information, see the
144
144
documentation for non-project specific
145
145
[ configuration] ( yaml_configuration.md#non-project-specific-configuration ) .
146
146
147
- If the file is deleted, and Stack needs to consult it, Stack will create a file
148
- with default contents.
147
+ If the file is deleted, and Stack needs to consult it, then Stack will create a
148
+ file with default contents.
149
149
150
150
### ` stack.sqlite3 `
151
151
152
152
This is a 'user' database that Stack uses to cache certain information. The
153
153
associated lock file is ` stack.sqlite3.pantry-write-lock ` .
154
154
155
+ ### ` .stack-work ` directory (optional)
156
+
157
+ Stack can build when there is no project-level configuration file (including one
158
+ in the ` global-project ` directory of the Stack root); for example, as a result
159
+ of a [ ` stack script ` ] ( script_command.md ) command (at the command line or in a
160
+ [ Stack interpreter options comment] ( scripts.md ) in a Haskell script file). When
161
+ it does so, the directory corresponding to a project directory is the Stack
162
+ root. Stack will create its work directory, named ` .stack-work ` by default, in
163
+ the Stack root.
164
+
165
+ If the work directory is deleted, and Stack needs that work directory, then
166
+ Stack will recreate it.
167
+
155
168
### ` global-project ` directory
156
169
157
170
This contains:
@@ -162,13 +175,13 @@ This contains:
162
175
* if created, Stack's working directory (` .stack-work ` ) for the global project.
163
176
164
177
If the project-level configuration file is deleted, and Stack needs to consult
165
- it, Stack will recreate the contents of the directory.
178
+ it, then Stack will recreate the contents of the directory.
166
179
167
180
### ` pantry\hackage ` directory
168
181
169
182
This contains a local cache of the package index. If the contents of the
170
- directory are deleted, and Stack needs to consult the package index, Stack will
171
- seek to download the latest package index.
183
+ directory are deleted, and Stack needs to consult the package index, then Stack
184
+ will seek to download the latest package index.
172
185
173
186
!!! info
174
187
@@ -185,8 +198,8 @@ This contains:
185
198
186
199
* the Pantry database used by Stack (` pantry.sqlite3 ` ) and its associated lock
187
200
file (` pantry.sqlite2.pantry-write-lock ` ). If the database is deleted, and
188
- Stack needs to consult it, Stack will seek to create and initialise it. The
189
- database is initialised with information from the package index; and
201
+ Stack needs to consult it, then Stack will seek to create and initialise it.
202
+ The database is initialised with information from the package index; and
190
203
* a database of package versions that come with each version of GHC
191
204
(` global-hints-cache.yaml ` ).
192
205
@@ -200,7 +213,18 @@ installed Stack-supplied tool:
200
213
* a directory for the tool.
201
214
202
215
To remove a Stack-supplied tool, delete all of the above. If Stack needs a
203
- Stack-supplied tool and it is unavailable, Stack will seek to obtain it.
216
+ Stack-supplied tool and it is unavailable, then Stack will seek to obtain it.
217
+
218
+ ### ` scripts ` directory (optional)
219
+
220
+ If the ` --compile ` or ` --optimize ` and ` --use-root ` flags are used with the
221
+ [ ` stack script ` ] ( script_command.md ) command, then this contains:
222
+
223
+ * script-specific locations, each containing all the compilation outputs
224
+ (inclduing the executable) generated by the command.
225
+
226
+ If the ` scripts ` directory, or a script-specific location within it, is deleted,
227
+ and Stack needs that directory, then Stack will recreate it.
204
228
205
229
### ` setup-exe-cache ` directory
206
230
@@ -209,7 +233,7 @@ version of GHC (an associated version of Cabal (the library)) that Stack has
209
233
used, an executable that Stack uses to access Cabal (the library).
210
234
211
235
If the contents of the directory are deleted, and Stack needs the executable,
212
- Stack will seek to rebuild it.
236
+ then Stack will seek to rebuild it.
213
237
214
238
### ` setup-exe-src ` directory
215
239
@@ -219,7 +243,7 @@ contains the two source files (`setup-<hash>.hs` and `setup-shim-<hash>.hs`)
219
243
that Stack uses to build the executable.
220
244
221
245
If the contents of the directory are deleted, and Stack needs the executable,
222
- Stack will recreate them.
246
+ then Stack will recreate them.
223
247
224
248
The hash in the names of the source files is a hash of arguments passed to GHC
225
249
when building the executable and the contents of the two source files.
@@ -243,7 +267,7 @@ This contains a directory for each snapshot that Stack creates when building
243
267
immutable dependencies of projects.
244
268
245
269
If the contents of the directory are deleted, and the snapshot is not available
246
- to Stack when it builds, Stack will recreate the snapshot.
270
+ to Stack when it builds, then Stack will recreate the snapshot.
247
271
248
272
### ` templates ` directory
249
273
@@ -252,7 +276,7 @@ further information, see the [`stack templates`](templates_command.md) command
252
276
documentation.
253
277
254
278
If the contents of the directory are deleted, an Stack needs a project template,
255
- Stack will seek to download the template.
279
+ then Stack will seek to download the template.
256
280
257
281
### ` upload ` directory
258
282
0 commit comments