2017-10-01 18:53:11 +01:00
|
|
|
# stack
|
|
|
|
|
2024-02-14 20:25:13 +00:00
|
|
|
> Manage Haskell projects.
|
2019-05-23 11:56:50 +01:00
|
|
|
> More information: <https://github.com/commercialhaskell/stack>.
|
2017-10-01 18:53:11 +01:00
|
|
|
|
2019-11-24 20:08:35 +00:00
|
|
|
- Create a new package:
|
2017-10-01 18:53:11 +01:00
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`stack new {{package}} {{template}}`
|
2017-10-01 18:53:11 +01:00
|
|
|
|
2019-11-24 20:08:35 +00:00
|
|
|
- Compile a package:
|
2017-10-01 18:53:11 +01:00
|
|
|
|
|
|
|
`stack build`
|
|
|
|
|
2019-11-24 20:08:35 +00:00
|
|
|
- Run tests inside a package:
|
2017-10-01 18:53:11 +01:00
|
|
|
|
|
|
|
`stack test`
|
|
|
|
|
|
|
|
- Compile a project and re-compile every time a file changes:
|
|
|
|
|
|
|
|
`stack build --file-watch`
|
|
|
|
|
|
|
|
- Compile a project and execute a command after compilation:
|
|
|
|
|
|
|
|
`stack build --exec "{{command}}"`
|
2017-12-19 12:01:07 +00:00
|
|
|
|
|
|
|
- Run a program and pass an argument to it:
|
|
|
|
|
2023-08-26 18:30:06 +01:00
|
|
|
`stack exec {{program}} -- {{argument}}`
|