diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-04-03 13:35:09 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-07-28 18:37:44 -0400 |
commit | 9c08cc9e522dbb4e3691067f5d11a731e09cd638 (patch) | |
tree | e6ce67b572c455fe699e071431863210870b42dc /docs/users_guide | |
parent | 10678945c1d3261273a1d7a389d14a69f4e28567 (diff) | |
download | haskell-wip/run-mode.tar.gz |
ghc: Introduce --run modewip/run-mode
As described in #18011, this mode provides similar functionality to the
`runhaskell` command, but doesn't require that the user know the path of
yet another executable, simplifying interactions with upstream tools.
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/using.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst index dee39d4d94..086ad30e5e 100644 --- a/docs/users_guide/using.rst +++ b/docs/users_guide/using.rst @@ -265,6 +265,20 @@ The available mode flags are: Interactive mode, which is also available as :program:`ghci`. Interactive mode is described in more detail in :ref:`ghci`. +.. ghc-flag:: --run ⟨file⟩ + :shortdesc: Run a Haskell program. + :type: mode + :category: modes + + .. index:: + single: run mode + single: GHCi + + Run a script's ``main`` entry-point. Similar to ``runghc`` this will by + default use the bytecode interpreter. If the command-line contains a ``--`` + argument then all arguments that follow will be passed to the script. All + arguments that precede ``--`` are interpreted as GHC arguments. + .. ghc-flag:: --make :shortdesc: Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using |