main = application args1 argsHandler{
handleMain =\(x :. y :.Nil) opts verb ->let f =maybe(+) (const(*)) (opts `get` optMult)
inprint$ f (posValue x) (posValue y)
, handleOpts = handleHelp "test1" hheader args1
}
hheader = ["Apply a binary function to float numbers:"]
Help Entries
user@domain > dist/build/tests/tests -h
Apply a binary function to float numbers:
test1 <x> <y> [plus] [mult] [help] [verbosity]
Positional:
x :: Float First number
y :: Float Second number
Optional:
plus
--plus
Sum two numbers (default)
mult
-x --mult
Multiply two numbers
help <cmd...>
-h --help
Show help
cmd... :: Text Commands to show the help for
verbosity <value>
-V --verbosity
Set verbosity
value :: Verbosity
verbosity level: 0-3
or 'silent', 'errors', 'warn', 'full'