1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 01:42:09 +02:00
tldr/pages/common/stack.md
2019-11-24 20:08:35 +00:00

28 lines
549 B
Markdown

# stack
> Tool for managing Haskell projects.
> More information: <https://github.com/commercialhaskell/stack>.
- Create a new package:
`stack new {{package_name}} {{template_name}}`
- 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_name}} -- {{argument}}`