File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,23 @@ that Stack uses to build the executable.
221
221
If the contents of the directory are deleted, and Stack needs the executable,
222
222
Stack will recreate them.
223
223
224
+ The hash in the names of the source files is a hash of arguments passed to GHC
225
+ when building the executable and the contents of the two source files.
226
+
227
+ The content of the ` setup-<hash>.hs ` file is the familiar:
228
+
229
+ ~~~ haskell
230
+ import Distribution.Simple
231
+ main = defaultMain
232
+ ~~~
233
+
234
+ The content of the ` setup-shim-<hash>.hs ` file uses ` main ` except when the
235
+ executable is called with arguments ` repl ` and ` stack-initial-build-steps ` . Then
236
+ Stack makes use of Cabal's ` defaultMainWithHooks ` and ` replHook ` field to create
237
+ the autogenerated files for every configured component; the ` replHook ` function
238
+ is provided with the information that ` initialBuildSteps ` needs. Stack's
239
+ ` stack ghci ` or ` stack repl ` commands call the executable with those arguments.
240
+
224
241
### ` snapshots ` directory
225
242
226
243
This contains a directory for each snapshot that Stack creates when building
You can’t perform that action at this time.
0 commit comments