úÎ!šÝ’#J      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone.HVCZ#cli Table widgetcliColumn for a tableJcliSize of the columnKcliName of the column. used in  Lcli4The justification to use for the cell of this columnMcliPif needed to wrap, whether text disappear or use multi lines row (unimplemented)cliA justification of text.cliLeft align textcliRight align textcli Center textcliText fills the whole line widthcliSummary cli2A progress bar widget created and used within the  function. cliTerminal display state cli4Element to output text and attributes to the displaycliLeft-aligned textcliRight-aligned textcli Centered textcliJustified textcliCreate a new displaycliDisplaycli A simple utility that display a msg in colorcli A simple utility that display a msg in color and newline at the end.clinCreate a new progress bar context from a terminal display, a number of items, and a progress update function.dThe progress bar update function should perform the desired actions on each of the items, and call % whenever an item is fully processed.âEach time the given update function calls progressTick the progress bar fills by one item until the given number of items is matched. Once the bar is filled it will not fill any further even if progressTick is called again.‡The progress bar will disappear when the given update function completes running, even if the progress bar is not yet entirely filled.ëFor example, the following function will create a progress bar of 100 items, and complete one of the items every tenth of a second. Once all of the items are completed the progress bar is removed and a completion String is returned. ĸorunProgressBar :: IO String runProgressBar = do terminalDisplay <- displayInit progress terminalDisplay 100 (progressFunction 100) where progressFunction :: Int -> ProgressBar -> IO String progressFunction 0 _ = return "Completed!" progressFunction n bar = do threadDelay 100000 progressTick bar progressFunction (n - 1) bar Ncli!Start displaying the progress barclivTicks an element on the given progress bar. Should be used within a progress bar update function that is passed into . ­progressFunction :: ProgressBar -> IO String progressFunction bar = do threadDelay 100000 progressTick bar threadDelay 200000 progressTick bar return "Completed!" cliCreate a summarycliSet the summarycli=Boxes a string to a given size using the given justification.yIf the size of the given string is greater than or equal to the given boxing size, then the original string is returned.Examples Basic usage:4justify JustifyRight 35 "Lorem ipsum dolor sit amet"%"Lorem ipsum dolor sit amet "3justify JustifyLeft 35 "Lorem ipsum dolor sit amet"%" Lorem ipsum dolor sit amet"5justify JustifyCenter 35 "Lorem ipsum dolor sit amet"%" Lorem ipsum dolor sit amet "8justify JustifyJustified 35 "Lorem ipsum dolor sit amet"%"Lorem ipsum dolor sit amet"œApply a justified justification to a one word string, resulting in a string of the given length with the word at the left followed by the remaining space.$justify JustifyJustified 10 "Hello." "Hello. "YAttempt to box a string that is larger than the given box, yielding the original string.&justify JustifyRight 5 "Hello, World!""Hello, World!"OcliWJustifies the given string so that it takes up the space of the entire given box size.PcliLInserts excess spaces between words for the process of justifying a string.cli8Create a new column setting the right default parameterscliCreate a new table cliShow the table headers!cliAppend 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.cli4The terminal display to display the progress bar on.cli0The number of items the progress bar represents.cli$The progression bar update function.cli0The results of the progress bar update function."  !"    ! BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe.HVGÔQcliA unique ID generatorRcli A unique IDScliCreate a new unique generatorTcli1get the next unique id and return a new generatorQRST BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe.HV[SUclinFlag error with the description of the flag, the index of the element causing the error, and the error itself.VcliMFlag return value after parsing made of a unique number and an optional valueWcli/the state of parsing the command line argumentsXcliEWhether a flag has an argument, an optional one or always an argumentYcli6Flatten fragments list into a final product to consumeZclishort flag parser o[clilong flag "flag"\cli[Description of this "flag" , flagDefault :: Maybe String -- ^ Has a default$cliFragment of flag definition.DUse the monoid approach to concat flags together e.g. > FlagShort o <> FlagLong "option"%clishort option e.g. '-a'&clilong option e.g. "--aaaa"'cli3description of this flag. | FlagDefault String]cliHow to parse a specific flag^cliflag number. internal value_cli"parser for the argument to an flag`cliXif the argument doesn't validate, return the error message associated, otherwise Nothingacli#Result of validation of flag value.bcliValidation successccliValidation failed with reasondcliDProduce the result structure after processing all the fragment list.ecli Parse flagsUfVXghiYjZ[\$%&']kl^_`mabcde BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe &'.EHSVXk@ncli8Transform a binded argument or flag into a haskell valueocli>Return value data type associated with a specific Param shape.(cliTget the value associated with a specific Param (either a Flag, FlagParam, or an Arg)pcli Wrapper for Action or no Action.)cliRepresent a program to run*cli*A dictionary of parsed flags and arguments+cli?return all the flags and their unique identifier. internal onlyqcliRecursive command treercli)A command that is composed of a hierarchyscliPositional argument index,cli&All the remaining positional arguments-cliA positional argument.cliQRepresent a Flag with optional or required value that can be added multiple times/cli>Represent a Flag with an optional or required value associated0cliPRepresent a Flag that can be called multiples times and will increase a counter.1cli0Represent a boolean flag (present / not present)tcliA unnamed argument)no(puv)*w+xyqz{r|}~€s,-‚.ƒ/„…0†1‡tˆ‰Š‹Œ BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodSafe.HVnUcliprint to stderr and newline.#TODO add implementation for windows BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone .HMSVXuļ 2cliOption description MonadŽcliProgram meta informationcli-Program name (usually name of the executable)cliProgram long description‘cliProgram version’cliFlag that triggers Help.“cliEOngoing State of the program description, as filled by monadic action”cliRun option description•cli"Return the next unique argument ID–cli+Return the next unique position argument ID2Ž—‘’“˜™š›œ”•– BSD-style#Vincent Hanquez <vincent@snarc.org> experimentalGoodNone &'.>EHSVXï3cli:return value of the option parser. only needed when using > directly8cliEA parser for a value. In case parsing failed Left should be returned.9cli9A parser for a flag's value, either optional or required.:cli,flag value parser with a required parameter.;cli=Optional flag value parser: Default value if not present to a<cli+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=clisame as <, but with the argument>cliš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.?cliSet the program name default is the result of base's ž@cliSet the program versionAcliSet the program descriptionBcli!Set the description for a commandCcliCreate a new sub commandDcli%Set the action to run in this commandEcli/Flag option either of the form -short or --long*for flag that doesn't have parameter, use GFcli Apply on a E^ to turn into a flag that can be invoked multiples, creating a list of values in the action.Gcli/Flag option either of the form -short or --long;for flag that expect a value (optional or mandatory), uses _HcliAn 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.Icli$All the remaining position arguments^This is useful for example for a program that takes an unbounded list of files as parameters.&$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI&<=>345672?@AC$%&'GEFHIDB)89:;10/.-,*+(Ÿ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_;`abcdefghijklmn_opqbfrstuvwxyz{|4}~€x‚ƒ„…789†:;z‡ˆ‰Š‹ŒŽ‘’“”Œ‘•–—˜™š›œ cli-0.2.0-8IWmmSm92FKJAZEkOJIjJaConsole.DisplayConsole.OptionsConsole.Options.NidConsole.Options.FlagsConsole.Options.TypesConsole.Options.UtilsConsole.Options.Monad%basement-0.0.8-LdnmevtSRu4FZXxmMQJlGYBasement.Terminal.ANSIColorComponentTableColumnJustify JustifyLeft JustifyRight JustifyCenterJustifyJustifiedSummary ProgressBarTerminalDisplay OutputElemBgFgTLeftTRightTCenterT JustifiedTNAtermText displayInitdisplaydisplayTextColor displayLnprogress progressTicksummary summarySetjustify columnNew tableCreate tableHeaders tableAppend$fShowOutputElem$fEqOutputElemFlagFrag FlagShortFlagLongFlagDescription getParamsActionParams paramsFlags ArgRemainingArgFlagMany FlagParam FlagLevelFlag OptionDesc OptionRes OptionSuccess OptionHelp OptionError OptionInvalid ValueParser FlagParser FlagRequired FlagOptional defaultMaindefaultMainWith parseOptions programNameprogramVersionprogramDescription descriptioncommandaction flagParamflagManyflagargumentremainingArguments columnSize columnName columnJustify columnWrap progressStartjustifyJustifiedinsertExcessSpaces NidGeneratorNid nidGeneratornidNext FlagError ParseState FlagArgDesc FlagFragments flagShortflagLongflagDescriptionFlagDescflagNidflagArgflagArgValidateFlagArgValidation FlagArgValidFlagArgInvalidflattenFragments parseFlags FlagArgNone FlagArgMaybe FlagArgHave flagFragments flagArityParamRet ActionWrapper CommandHierCommand UnnamedIndexArgument ActionWrappedNoActionWrappedparamsPinnedArgsparamsRemainingArgs CommandTree CommandLeafgetCommandHiergetCommandDescriptiongetCommandOptionsgetCommandAction ArgsRemaining FlagParamOptArgumentCatchAll argumentNameargumentDescriptionargumentValidate hPutErrLn ProgramMetaprogramMetaNameprogramMetaDescriptionprogramMetaVersionprogramMetaHelp ProgramDesc gatherDesc getNextID getNextIndexstMetastCTstNextID stNextIndexmodifybaseSystem.Environment getProgName