|
definition: |
processArgs :: Bool -> [String] -> IO ()
processArgs runlatex args = case args of
[] -> showError
["-h"] -> showHelp
["-?"] -> showHelp
["--help"] -> showHelp
"-c":rargs -> invokeCurry rargs
["-l",prog] -> invokeCurry [":load",prog]
"-f":rargs -> processArgs True rargs
[infile] -> if head infile == '-'
then showError
else let texfile = if takeExtension infile == ".tex"
then infile
else infile ++ ".tex"
in mainExec texfile runlatex
_ -> showError
where
showError =
error ("Illegal arguments (use '--help' for description):\n" ++ unwords args)
|
|
demand: |
argument 2 |
|
deterministic: |
deterministic operation |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,{[]}) |-> _ || (_,{:}) |-> _}
|
|
name: |
processArgs |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Prelude.Bool -> [String] -> Prelude.IO () |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |