Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Describe the 'run' command in the user guide.

  • Loading branch information...
commit bd8efdf276f49577b19fdeac7a06a0e28ae5b1b4 1 parent f551e91
@23Skidoo authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 Cabal/doc/developing-packages.markdown
View
15 Cabal/doc/developing-packages.markdown
@@ -488,6 +488,21 @@ information](#build-information)).
using a preprocessor. The source file must be relative to one of the
directories listed in `hs-source-dirs`.
+#### Running executables ####
+
+You can have Cabal build and run your executables by using the `run` command:
+
+~~~~~~~~~~~~~~~~
+$ cabal run EXECUTABLE [-- EXECUTABLE_FLAGS]
+~~~~~~~~~~~~~~~~
+
+This command will configure, build and run the executable `EXECUTABLE`. The
+double dash separator is required to distinguish executable flags from `run`'s
+own flags. If there is only one executable defined in the whole package, the
+executable's name can be omitted. See the output of `cabal help run` for a list
+of options you can pass to `cabal run`.
+
+
### Test suites ###
Test suite sections (if present) describe package test suites and must have an
Please sign in to comment.
Something went wrong with that request. Please try again.