úÎodŽL      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeLprint to stderr and newline.#TODO add implementation for windowsLLL BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeMA unique ID generatorN A unique IDOCreate a new unique generatorP1get the next unique id and return a new generatorMQNROPMNOPMQNROP BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafeSnFlag error with the description of the flag, the index of the element causing the error, and the error itself.TMFlag return value after parsing made of a unique number and an optional valueU/the state of parsing the command line argumentsVEWhether a flag has an argument, an optional one or always an argumentW6Flatten fragments list into a final product to consumeXshort flag parser oYlong flag "flag"Z[Description of this "flag" , flagDefault :: Maybe String -- ^ Has a default Fragment of flag definition.DUse the monoid approach to concat flags together e.g. > FlagShort o <> FlagLong "option" short option e.g. '-a' long option e.g. "--aaaa"3description of this flag. | FlagDefault String[How to parse a specific flag\flag number. internal value]"parser for the argument to an flag^Xif the argument doesn't validate, return the error message associated, otherwise Nothing_#Result of validation of flag value.`Validation successaValidation failed with reasonbDProduce the result structure after processing all the fragment list.c Parse flags$SdTUefghiVjklWmXYZ n[op\]^q_`abcrSdTVjklWmXYZ [op\]^q_`abc SdTUefghiVjklWmXYZ  n[op\]^q_`abcr BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe !";>ILNs8Transform a binded argument or flag into a haskell valuet>Return value data type associated with a specific Param shape.Tget the value associated with a specific Param (either a Flag, FlagParam, or an Arg)u Wrapper for Action or no Action.Represent a program to run*A dictionary of parsed flags and arguments?return all the flags and their unique identifier. internal onlyvRecursive command treew)A command that is composed of a hierarchyxPositional argument index&All the remaining positional argumentsA positional argumentQRepresent a Flag with optional or required value that can be added multiple times>Represent a Flag with an optional or required value associatedPRepresent a Flag that can be called multiples times and will increase a counter.0Represent a boolean flag (present / not present)yA unnamed argument/stuz{|}~v€w‚ƒ„…x†‡ˆ‰Š‹ŒyŽ‘’“”•–—)stuz{|}~v€w‚ƒ„…x†‡ˆ‰Š‹ŒyŽ‘stuz{|}~v€w‚ƒ„…x†‡ˆ‰Š‹Œy‘ŽŽ’“”•–— BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNoneCIN Option description Monad˜Program meta information™-Program name (usually name of the executable)šProgram long description›Program versionœFlag that triggers Help.EOngoing State of the program description, as filled by monadic actionžRun option descriptionŸ"Return the next unique argument ID +Return the next unique position argument IDĄĒ˜Ģ™š›œĪĨͧĻĐžŠŸ ˜Ģ™š›œĪĨĶ§ĻžŸ ĄĒ˜Ģ™š›œĪĨͧĻĐžŠŸ  BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe Table widgetColumn for a tableŦSize of the columnŽName of the column. used in 4­4The justification to use for the cell of this columnŪPif needed to wrap, whether text disappear or use multi lines row (unimplemented)Justify positionSummary Progress bar widget!Terminal display state"4Element to output text and attributes to the display)Create a new display*Display+ A simple utility that display a msg in color, A simple utility that display a msg in color and newline at the end.-!Create a new progress bar contextŊ!Start displaying the progress bar.#Tick an element on the progress bar/Create a summary0Set the summary1;box a string to a specific size, choosing the justification28Create a new column setting the right default parameters3Create a new table4Show the table headers5Append a row to the table.„if the number of elements is greater than the amount of column the table has been configured with, the extra elements are dropped.3°ąēģŦŽ­Ūīĩķ·ļđšŧž ―!ū"#$%&'()*ŋ+,Ā-ÁŊ./012345'  !"#$%&'()*+,-./012345'!)*+, -./0 "#$%&'( 12345°ąēģŦŽ­Ūīĩķ·ļđšŧž ―!ū"#$%&'()*ŋ+,Ā-ÁŊ./012345 BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone !"4;>CILN6:return value of the option parser. only needed when using @ directlyÂEA parser for a value. In case parsing failed Left should be returned.;9A parser for a flag's value, either optional or required.<,flag value parser with a required parameter.==Optional flag value parser: Default value if not present to a>+run parse options description on the actionOto be able to specify the arguments manually (e.g. pre-handling), you can use ?5. >defaultMain dsl = getArgs >>= defaultMainWith dsl?same as >, but with the argument@šThis is only useful when you want to handle all the description parsing manually and need to not automatically execute any action or help/error handling.Used for testing the parser.ASet the program nameBSet the program versionCSet the program descriptionD!Set the description for a commandECreate a new sub commandF%Set the action to run in this commandG/Flag option either of the form -short or --long*for flag that doesn't have parameter, use IH Apply on a G^ to turn into a flag that can be invoked multiples, creating a list of values in the action.I/Flag option either of the form -short or --long;for flag that expect a value (optional or mandatory), uses flagArgJAn unnamed positional argumentŸFor now, argument in a point of tree that contains sub trees will be ignored. TODO: record a warning or add a strict mode (for developping the CLI) and error.K$All the remaining position arguments^This is useful for example for a program that takes an unbounded list of files as parameters.!6789:Â;<=ÃÄÅÆĮ>?@ČÉĘABCDËĖEFGHIJK% 6789:;<=>?@ABCDEFGHIJK&>?@6789:ABCE IGHJKFD;<=6789:Â;<=ÃÄÅÆĮ>?@ČÉĘABCDËĖEFGHIJKÍ               !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[XY\#]^_`abcdefghijk\]lmlnopq_ crstuvwxyz{|}~€y‚ƒ„…† ‡!"#{ˆ‰Š‹ŒŽ‘’“”•–—˜™š$›’—œžŸ ĄĒĢĪĨĶ%§Ļ&ĐĐŠŦŽ­Ū*Ŋ+,°ąēģīĩķ·ļđšŧž―ūcli_5kLwAWyKNXi7FEAKOKoyTYConsole.DisplayConsole.OptionsConsole.Options.UtilsConsole.Options.NidConsole.Options.FlagsConsole.Options.TypesConsole.Options.Monadtermi_6iVf4EBnOgfIaaOCLRs8jlSystem.Console.Terminfo.Color ColorNumberWhiteCyanMagentaBlueYellowGreenRedBlackColorSystem.Console.Terminfo.BasetermTextFlagFrag FlagShortFlagLongFlagDescription getParamsActionParams paramsFlags ArgRemainingArgFlagMany FlagParam FlagLevelFlag OptionDescTableColumnJustify JustifyLeft JustifyRightSummary ProgressBarTerminalDisplay OutputElemBgFgTLeftTRightTNA displayInitdisplaydisplayTextColor displayLnprogress progressTicksummary summarySetjustify columnNew tableCreate tableHeaders tableAppend OptionRes OptionSuccess OptionHelp OptionError OptionInvalid FlagParser FlagRequired FlagOptional defaultMaindefaultMainWith parseOptions programNameprogramVersionprogramDescription descriptioncommandaction flagParamflagManyflagargumentremainingArguments hPutErrLn NidGeneratorNid nidGeneratornidNext FlagError ParseState FlagArgDesc FlagFragments flagShortflagLongflagDescriptionFlagDescflagNidflagArgflagArgValidateFlagArgValidation FlagArgValidFlagArgInvalidflattenFragments parseFlagsMatching NoMatchingMatchingWithArg FlagArgNone FlagArgMaybe FlagArgHave flagFragments flagArity$fMonoidFlagFragParamRet ActionWrapper CommandHierCommand UnnamedIndexArgument ActionWrappedNoActionWrappedparamsPinnedArgsparamsRemainingArgs CommandTree CommandLeafgetCommandHiergetCommandDescriptiongetCommandOptionsgetCommandAction ArgsRemaining FlagParamOpt argumentNameargumentDescriptionargumentValidateArgumentCatchAll$fParamArgRemaining $fParamArg$fParamFlagMany$fParamFlagParam$fParamFlagLevel $fParamFlag ProgramMetaprogramMetaNameprogramMetaDescriptionprogramMetaVersionprogramMetaHelp ProgramDesc gatherDesc getNextID getNextIndex runOptionDescstMetastCTstNextID stNextIndexprogramMetaDefaultinitialProgramDesc columnSize columnName columnJustify columnWrap progressStarttColumns rowSeparator ProgressStatepgLhspgRhspgMax pgCurrentSummaryBackendProgressBackend renderOutputinitProgressStateshowBar ValueParsersetDescription setAction addOption tweakOptionaddArghelp runOptionsindent modifyHiermodifyCT