| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Console.Options.Failure
Description
Failure pretty printing.
Synopsis
- failure :: Options Identity f -> Failure -> Doc ann
- unrecognized :: Options Identity f -> ShortByteString -> Name -> Doc ann
- unsaturated :: Name -> Doc ann
- oversaturated :: ShortText -> Doc ann
Documentation
failure :: Options Identity f -> Failure -> Doc ann Source #
Failure description, with suggestions if applicable.
Examples for each specific failure case are given below.
Constituents
Arguments
| :: Options Identity f | |
| -> ShortByteString | Argument converted to WTF-8. |
| -> Name | |
| -> Doc ann |
Unrecognized failure case, with suggestions if applicable.
>>>let opt = Option [Short 'i', Short 'a', Short 'b', Long "abode"] Plain>>>let opts = insert opt id none>>>unrecognized opts "--abid" (Long "abid")invalid option '--abid'; perhaps you meant any of '-a', '-b', '-i' or '--abode'?
unsaturated :: Name -> Doc ann Source #
Unsaturated failure case.
>>>unsaturated (Long "foo")option '--foo' requires an argument
Oversaturated failure case.
>>>oversaturated "foo"option '--foo' doesn't allow an argument>>>oversaturated ""end of options delimiter '--' doesn't allow an argument