HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecmdargs-0.10.22Haskell2010

System.Console.CmdArgs.Helper

Module for implementing CmdArgs helpers. A CmdArgs helper is an external program, that helps a user construct the command line arguments. To use a helper set the environment variable $CMDARGS_HELPER (or $CMDARGS_HELPER_YOURPROGRAM) to one of:

  • echo foo will cause foo to be used as the command arguments.

  • cmdargs-browser will cause a web browser to appear to help entering the arguments. For this command to work, you will need to install the cmdargs-browser package: http://hackage.haskell.org/package/cmdargs-browser

  • 1 type
  • 4 values
  • Packagecmdargs-0.10.22
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceHelper.hs

Called by the main program

1 declaration
valueexecute
  1. :: String

    Name of the command to run, e.g. echo argument, cmdargs-browser

  2. -> Mode a

    Mode to run remotely

  3. -> [String]

    Initial set of command line flags (not supported by all helpers)

  4. -> IO (Either String [String])

    Either an error message, or a list of flags to use

#

Run a remote command line entry.

Called by the helper program

4 declarations
newtypenewtype Unknown
#

Unknown value, representing the values stored within the Mode structure. While the values are not observable, they behave identically to the original values.

valuereply :: Either String [String] -> IO ()
#

Send a reply with either an error, or a list of flags to use. This function exits the helper program.

valuecomment :: String -> IO ()
#

Send a comment which will be displayed on the calling console, mainly useful for debugging.