2025-03-14 21:59:59 -06:00
|
|
|
# stack
|
|
|
|
|
|
|
|
|
|
> Manage Haskell projects.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://docs.haskellstack.org/en/stable/commands/>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Create a new package:
|
|
|
|
|
|
|
|
|
|
`stack new {{package}} {{template}}`
|
|
|
|
|
|
|
|
|
|
- Compile a package:
|
|
|
|
|
|
|
|
|
|
`stack build`
|
|
|
|
|
|
|
|
|
|
- Run tests inside a package:
|
|
|
|
|
|
|
|
|
|
`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}}"`
|
|
|
|
|
|
|
|
|
|
- Run a program and pass an argument to it:
|
|
|
|
|
|
|
|
|
|
`stack exec {{program}} -- {{argument}}`
|