Defines the abstract CLI interface for Lake.
Types #
Equations
Instances For
Equations
- Lake.ArgsT.run args self = StateT.run self args
Instances For
Equations
- Lake.ArgsT.run' args self = StateT.run' self args
Instances For
Utilities #
Get the remaining argument list.
Equations
Instances For
Replace the argument list.
Equations
- Lake.setArgs args = set (Lake.ArgList.mk args)
Instances For
Take the head of the remaining argument list (or none if empty).
Equations
Instances For
Take the head of the remaining argument list (or default
if none).
Equations
Instances For
Add a string to the head of the remaining argument list.
Instances For
Process a short option of the form -x=arg
.
Equations
- Lake.shortOptionWithEq handle opt = do Lake.consArg (opt.drop 3) handle (opt.get { byteIdx := 1 })
Instances For
Process a short option of the form "-x arg"
.
Equations
- Lake.shortOptionWithSpace handle opt = do Lake.consArg (opt.drop 2).trimLeft handle (opt.get { byteIdx := 1 })
Instances For
Process a short option of the form -xarg
.
Equations
- Lake.shortOptionWithArg handle opt = do Lake.consArg (opt.drop 2) handle (opt.get { byteIdx := 1 })
Instances For
Process a multiple short options grouped together (ex. -xyz
as x
, y
, z
).
Equations
- Lake.multiShortOption handle opt = Lake.multiShortOption.loop✝ handle opt { byteIdx := 1 }
Instances For
Splits a long option of the form "--long foo bar"
into --long
and "foo bar"
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Splits a long option of the form --long=arg
into --long
and arg
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Process a long option of the form --long
, --long=arg
, "--long arg"
.
Equations
- Lake.longOption handle = Lake.longOptionOrEq (Lake.longOptionOrSpace handle)
Instances For
Process a short option of the form -x
, -x=arg
, -x arg
, or -long
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Process an option, short or long, using the given handlers.
An option is an argument of length > 1 starting with a dash (-
).
An option may consume additional elements of the argument list.
Equations
Instances For
Process the head argument of the list using handle
if it is an option.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Process the leading options of the remaining argument list. Consumes empty leading arguments in the argument list.
Process every option in the argument list.
Equations
- Lake.processOptions handle = do let __do_lift ← Lake.collectArgs handle Lake.setArgs __do_lift.toList