Some of Stack's features will not be needed regularly or by all users. This part of the guide and the part on configuration provide information about some of those features, organised as a reference guide. Some of the features are complex and separate pages are dedicated to them.
stack command¶Stack is usually used with one of its commands (see further below). However:
stack
, stack --help
(or -h
) lists Stack's commands, and flags and options common to those commands;
stack <command> --help
(or -h
) — provides help on the particular Stack command, including flags and options specific to the command; and
stack --version
identifies the version and Git hash of the Stack executable.
Runtime system (RTS) options
The Stack executable is built by GHC with the -rtsopts=some
option. This means that the RTS extracts command-line arguments bracketed between +RTS
and -RTS
as its own when Stack is run. Only the following RTS options are available:
-?
(e.g. stack +RTS -?
) causes the RTS to output information about RTS options; and
--info
(e.g. stack +RTS --info
) causes the RTS to output information about the RTS.
To avoid the RTS extracting such command-line arguments as its own when using Stack commands such as exec
, test
or bench
, see the documentation for those commands.
setup
- get GHC for a Stack project (usually not needed)update
- update the package index (usually not needed)new
- create a new project with Stackinit
- initialise Stack's project-level YAML configuration file for an existing projectbuild
- build packagestest
- a synonym for stack build --test
bench
- a synonym for stack build --bench
haddock
- a synonym for stack build --haddock
install
- a synonym for stack build --copy-bins
run
- build and run an executabledocker
- use Stack with Dockerexec
- executate a command in the Stack environmentghc
- run ghc
eval
- evaluate some Haskell code inlinerunghc
- run runghc
runhaskell
- a synonym for stack runghc
unpack
- unpack one or more packages locallysdist
- create an archive file for a package, in a form accepted by Hackageupload
- upload a package to Hackageclean
- delete build artefacts for the project packagespurge
- delete the Stack working directoriesconfig set
- modify Stack's configurationscript
- run a Haskell source file as a scriptpath
- information about locations used by Stackls
- list information about Stacklist
- list packages on Hackage or in a snapshotide
- information for an integrated development environment (IDE)query
- information about the buildconfig env
- modify Stack's configurationtemplates
- information about templates for use with stack new
uninstall
- information about how to uninstall Stackhoogle
- run hoogle
dot
- dependency visualizationhpc
- generate Haskell Program Coverage (HPC) code coverage reportsupgrade
- upgrade StackStack's commands are listed below, in alphabetical order.
bench
- a synonym for stack build --bench
build
- build packagesclean
- delete build artefacts for the project packagesconfig
- access and modify Stack's configurationdocker
- use Stack with Dockerdot
- dependency visualizationeval
- evaluate some Haskell code inlineexec
- executate a command in the Stack environmenthaddock
- a synonym for stack build --haddock
hoogle
- run hoogle
hpc
- generate Haskell Program Coverage (HPC) code coverage reportsghc
- run ghc
ghci
- run GHCi, a REPL environmentide
- information for an integrated development environment (IDE)init
- initialise Stack's project-level YAML configuration file for an existing projectinstall
- a synonym for stack build --copy-bins
list
- list packages on Hackage or in a snapshotls
- list information about Stacknew
- create a new project with Stackpath
- information about locations used by Stackpurge
- delete the Stack working directoriesquery
- information about the buildrepl
- a synonym for stack ghci
run
- build and run an executablerunghc
- run runghc
runhaskell
- a synonym for stack runghc
script
- run a Haskell source file as a scriptsdist
- create an archive file for a package, in a form accepted by Hackagesetup
- get GHC for a Stack projecttemplates
- information about templates for use with stack new
test
- a synonym for stack build --test
uninstall
- information about how to uninstall Stackunpack
- unpack one or more packages locallyupdate
- update the package indexupgrade
- upgrade Stackupload
- upload a package to HackageRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4