ContentsIndex
Shell.Options
Portability portable
Stability Minor changes allowed.
Maintainer egallego@babel.ls.fi.upm.es
Description

Last modified: 22 Oct 2004, 17:41

Process command line arguments.

Synopsis
data Params
= PInt Int
| PString String
| PNothing
data Flag = Flag String Params
getFlag :: String -> [Flag] -> Maybe Params
getOptions :: [String] -> IO ([Flag], [String])
help :: String
Documentation
data Params
A command line flag can have some data associated to it.
Constructors
PInt Int
PString String
PNothing
Instances
Eq Params
Show Params
data Flag
Flag data type.
Constructors
Flag String Params
Instances
Eq Flag
Show Flag
getFlag
:: StringName of flag to search
-> [Flag]List of flags.
-> Maybe ParamsFlag parameters.
Gets flag parameters.
getOptions
:: [String]Command line args.
-> IO ([Flag], [String])
Based on GetOpt documentation. Returns the list of command line flags and arguments We use IO monad for error purposes.
help :: String
Help string of ramc.
Produced by Haddock version 0.6