Arg package:named

Match on an argument without specifying its name. See also: arg.
arg unwraps a named parameter with the specified name. One way to use it is to match on arguments with -XViewPatterns:
fn (arg #t -> t) (arg #f -> f) = ...
This way, the names of parameters can be inferred from the patterns: no type signature for fn is required. In case a type signature for fn is provided, the parameters must come in the same order:
fn :: "t" :! Integer -> "f" :! Integer -> ...
fn (arg #t -> t) (arg #f -> f) = ... -- ok
fn (arg #f -> f) (arg #t -> t) = ... -- does not typecheck
Match on an F-argument without specifying its name. See also: argF.
A variation of arg for optional arguments. Requires a default value to handle the case when the optional argument was omitted:
fn (argDef #answer 42 -> ans) = ...
In case you want to get a value wrapped in Maybe instead, use argF or ArgF.
argF is similar to arg: it unwraps a named parameter with the specified name. The difference is that the result of argF is inside an arity wrapper, which is Identity for normal parameters and Maybe for optional parameters.