|
definition: |
options :: [OptDescr (Options -> Options)]
options =
[ Option "h?" ["help"] (NoArg (\opts -> opts { optHelp = True }))
"print help and exit"
, Option "q" ["quiet"] (NoArg (\opts -> opts { optVerb = 0 }))
"run quietly (no output, only exit code)"
, Option "v" ["verbosity"]
(OptArg (maybe (checkVerb 2) (safeReadNat checkVerb)) "<n>")
"verbosity level:\n0: quiet (same as `-q')\n1: show progress (default)\n2: show generated output (same as `-v')"
, Option "o" ["output"]
(ReqArg (\n opts -> opts { optOutput = n }) "<o>")
"name of output file (e.g., Makefile)"
, Option "r" ["root"]
(ReqArg (\n opts -> opts { optRoot = n }) "<r>")
"root directory of the Curry system in Makefile"
, Option "t" ["tool"]
(ReqArg (\n opts -> opts { optTool = n }) "<t>")
"name of the tool binary"
]
where
safeReadNat opttrans s opts = case readNat s of
[(n,"")] -> opttrans n opts
_ -> error "Illegal number argument (try `-h' for help)"
checkVerb n opts = if n>=0 && n<3
then opts { optVerb = n }
else error "Illegal verbosity level (try `-h' for help)"
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Definition of actual command line options. |
|
failfree: |
() |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{() |-> {:}}
|
|
name: |
options |
|
precedence: |
no precedence defined |
|
result-values: |
{:}
|
|
signature: |
[System.Console.GetOpt.OptDescr (Options -> Options)] |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |