ContentsIndex
Shell.Options
Portabilityportable
StabilityMinor changes allowed.
Maintaineregallego@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
show/hide Instances
Eq Params
Show Params
data Flag
Flag data type.
Constructors
Flag String Params
show/hide 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.8