ܬџ=      !"#$%&'()*+,-./0123456789:;<MIT Safe-Inferred =>?@AB=>?@AB=>?@ABMIT Safe-Inferred:A short title for the group, which is used when printing --help output.9A description of the group, which is used when printing --help output.CDEFGHIJKLMNOPQRSTUVWXYZ[\]CDEFGHIJKLMNOPQRSTUVWXYZ[\]C DEFGHIJKLMNOPQRSTUZYXWV[\]MIT Safe-Inferred=K%^_`abcdefghijklmnopqrstuvwxyz{|}~ jklmnopqrs^_`abcdefghijklmnpoqrstuvwxyz{|}~MIT Safe-Inferred MIT Safe-Inferred244See ;.See 8.See 8 and ;. xShort flags are a single character. When entered by a user, they are preceded by a dash and possibly other short flags.)Short flags must be a letter or a number.Example: An option with optionShortFlags = ['p'] may be set using: $ ./app -p 443 $ ./app -p443 ]Long flags are multiple characters. When entered by a user, they are preceded by two dashes.)Long flags may contain letters, numbers, '-', and '_'.Example: An option with optionLongFlags = ["port"] may be set using: %$ ./app --port 443 $ ./app --port=443 iOptions may have a default value. This will be parsed as if the user had entered it on the command line. DAn option's description is used with the default implementation of --help?. It should be a short string describing what the option does. KWhich group the option is in. See the "Option groups" section for details. TODO docsAn option's type determines how the option will be parsed, and which Haskell type the parsed value will be stored as. There are many types available, covering most basic types and a few more advanced types.&The name of this option type; used in --help output.BThe default value for options of this type. This will be used if  % is not set when defining the option.gTry to parse the given string to an option value. If parsing fails, an error message will be returned.&Format the value for display; used in --help output.If not Nothing, then options of this type may be set by a unary flag. The option will be parsed as if the given value were set.iIf not Nothing, then options of this type may be set with repeated flags. Each flag will be parsed with d, and the resulting parsed values will be passed to this function for merger into the final value.ROptions are defined together in a single data type, which will be an instance of .See & for details on defining instances of .vDefines the structure and metadata of the options in this type, including their types, flag names, and documentation.FOptions with a basic type and a single flag name may be defined with 1>. Options with more complex requirements may be defined with 2.NNon-option fields in the type may be set using applicative functions such as .EOptions may be included from another type by using a nested call to .Library authors are encouraged to aggregate their options into a few top-level types, so application authors can include it easily in their own option definitions.An options value containing only the default values for each option. This is equivalent to the options value when parsing an empty argument list.;Define an option group with the given name and title. Use / to add additional descriptive text, if needed.DDefine a new option type with the given name, default, and behavior.Store an option as a %. The option's value must be either "true" or "false".Boolean options are unary, which means that their value is optional when specified on the command line. If a flag is present, the option is set to True. $ ./app -q $ ./app --quietPBoolean options may still be specified explicitly by using long flags with the  --flag=value6 format. This is the only way to set a unary flag to "false". *$ ./app --quiet=true $ ./app --quiet=falseStore an option value as a . The value is decoded to Unicode first, if needed. The value may contain non-Unicode bytes, in which case they will be stored using GHC 7.4's encoding for mixed-use strings.Store an option as an M. The option value must be an integer. There is no minimum or maximum value. Store an option as an &. The option value must be an integer n such that  <= n <= .!Store an option as an &. The option value must be an integer n such that  <= n <= ."Store an option as an &. The option value must be an integer n such that  <= n <= .#Store an option as an &. The option value must be an integer n such that  <= n <= .$Store an option as an &. The option value must be an integer n such that  <= n <= .%Store an option as a /. The option value must be a positive integer n such that  0 <= n <= .&Store an option as a /. The option value must be a positive integer n such that  0 <= n <= .'Store an option as a /. The option value must be a positive integer n such that  0 <= n <= .(Store an option as a /. The option value must be a positive integer n such that  0 <= n <= .)Store an option as a /. The option value must be a positive integer n such that  0 <= n <= .*Store an option as a . The option value must be a number. Due to the imprecision of floating-point math, the stored value might not exactly match the user's input. If the user's input is out of range for the  type, it will be stored as Infinity or  -Infinity.+Store an option as a . The option value must be a number. Due to the imprecision of floating-point math, the stored value might not exactly match the user's input. If the user's input is out of range for the  type, it will be stored as Infinity or  -Infinity.,Store an option as a % of another type. The value will be Nothing) if the option is set to an empty string.-Store an option as a , using another option type for the elements. The separator should be a character that will not occur within the values, such as a comma or semicolon..Duplicate elements in the input are permitted..Store an option as a 4, using other option types for the keys and values.The item separator is used to separate key/value pairs from eachother. It should be a character that will not occur within either the keys or values.The value separator is used to separate the key from the value. It should be a character that will not occur within the keys. It may occur within the values.SDuplicate keys in the input are permitted. The final value for each key is stored./Store an option as a list, using another option type for the elements. The separator should be a character that will not occur within the values, such as a comma or semicolon.0lStore an option as one of a set of possible values. The type must be a bounded enumeration, and the type's 0 instance will be used to implement the parser.This is a simplistic implementation, useful for quick scripts. Users with more complex requirements for enum parsing are encouraged to define their own option types using . data Action = Hello | Goodbye deriving (Bounded, Enum, Show) data MainOptions = MainOptions { optAction :: Action } instance  MainOptions where  = pure MainOptions <*> 23 (optionType_enum "action") (\o -> o {   = ["action"] ,   = Hello }) main = 9O $ \opts args -> do putStrLn ("Running action " ++ show (optAction opts)) L$ ./app Running action Hello $ ./app --action=Goodbye Running action Goodbye11Defines a new option in the current options type.21Defines a new option in the current options type."All options must have one or more flagsE. Options may also have a default value, a description, and a group.The flagsI are how the user specifies an option on the command line. Flags may be short or long. See   and   for details. 2 ' (\o -> o {   = ["port"] ,   = 80 }) 34Get the options value that was parsed from argv, or Nothing7 if the arguments could not be converted into options.Note: This function return Nothingj if the user provided a help flag. To check whether an error occured during parsing, check the value of 6.4Get command-line arguments remaining after parsing options. The arguments are unchanged from the original argument list, and have not been decoded or otherwise transformed.58Get the subcommand action that was parsed from argv, or Nothing> if the arguments could not be converted into a valid action.Note: This function return Nothingj if the user provided a help flag. To check whether an error occured during parsing, check the value of 6.6FGet the error that prevented options from being parsed from argv, or Nothing if no error was detected.7Get a help message to show the user. If the arguments included a help flag, this will be a message appropriate to that flag. Otherwise, it is a summary (equivalent to --help).This is always a non-empty string, regardless of whether the parse succeeded or failed. If you need to perform additional validation on the options value, this message can be displayed if validation fails.8Attempt to convert a list of command-line arguments into an options value. This can be used by application developers who want finer control over error handling, or who want to perform additional validation on the options value.AThe argument list must be in the same encoding as the result of .Use 3, 4, 6, and 7 to inspect the result of 8.Example: rgetOptionsOrDie :: Options a => IO a getOptionsOrDie = do argv <- System.Environment.getArgs let parsed = 8 argv case 3D parsed of Just opts -> return opts Nothing -> case 6H parsed of Just err -> do hPutStrLn stderr (7 parsed) hPutStrLn stderr err exitFailure Nothing -> do hPutStr stdout (7& parsed) exitSuccess 9 Retrieve 4, and attempt to parse it into a valid value of an q type plus a list of left-over arguments. The options and arguments are then passed to the provided computation.AIf parsing fails, this computation will print an error and call ./If parsing succeeds, and the user has passed a --help flag, and the developer is using the default help flag definitions, then this computation will print documentation and call .See <# for details on subcommand support.;Attempt to convert a list of command-line arguments into a subcommand action. This can be used by application developers who want finer control over error handling, or who want subcommands that run in an unusual monad.AThe argument list must be in the same encoding as the result of .Use 5, 6, and 7 to inspect the result of ;.Example: runSubcommand :: Options cmdOpts => [Subcommand cmdOpts (IO a)] -> IO a runSubcommand subcommands = do argv <- System.Environment.getArgs let parsed = ; subcommands argv case 5; parsed of Just cmd -> cmd Nothing -> case 6H parsed of Just err -> do hPutStrLn stderr (7 parsed) hPutStrLn stderr err exitFailure Nothing -> do hPutStr stdout (7& parsed) exitSuccess <9Used to run applications that are split into subcommands.Use : to define available commands and their actions, then pass them to this computation to select one and run it. If the user specifies an invalid subcommand, this computation will print an error and call ". In handling of invalid flags or --help, < acts like 9. import Control.Applicative import Control.Monad (unless) import Options data MainOptions = MainOptions { optQuiet :: Bool } instance  MainOptions where  = pure MainOptions <*> 1b "quiet" False "Whether to be quiet." data HelloOpts = HelloOpts { optHello :: String } instance  HelloOpts where  = pure HelloOpts <*> 1] "hello" "Hello!" "How to say hello." data ByeOpts = ByeOpts { optName :: String } instance  ByeOpts where  = pure ByeOpts <*> 1\ "name" "" "The user's name." hello :: MainOptions -> HelloOpts -> [String] -> IO () hello mainOpts opts args = unless (optQuiet mainOpts) $ do putStrLn (optHello opts) bye :: MainOptions -> ByeOpts -> [String] -> IO () bye mainOpts opts args = unless (optQuiet mainOpts) $ do putStrLn ("Good bye " ++ optName opts) main :: IO () main = < [ : "hello" hello , : "bye" bye ] x$ ./app hello Hello! $ ./app hello --hello='Allo!' Allo! $ ./app bye Good bye $ ./app bye --name='Alice' Good bye Aliceh Name Title; see .Description; see .Name Default valueParser Formatter !"#$%&'()*+,-Element separator Element type.Item separatorKey/Value separatorKey type Value type/Element separator Element type0Option type name123456789:The subcommand name.The action to run.;<=  !"#$%&'()*+,-./0123456789:;?@ABCDEFGHHIJKLMNOPQRSSTUVWXYZ[\X]]^^_``abcdefghhijkklmnopqrstuvwxyz{|}~   options-1.2.1.1Options Options.Util Options.TypesOptions.Tokenize Options.HelpGroup groupName groupTitlegroupDescription SubcommandParsedSubcommand ParsedOptionsParsedOptionoptionShortFlagsoptionLongFlags optionDefaultoptionDescription optionGroupSimpleOptionTypesimpleOptionType OptionTypeoptionTypeNameoptionTypeDefaultoptionTypeParseoptionTypeShowoptionTypeUnaryoptionTypeMerge DefineOptions defineOptionsdefaultOptionsgroup optionTypeoptionType_booloptionType_stringoptionType_integeroptionType_intoptionType_int8optionType_int16optionType_int32optionType_int64optionType_wordoptionType_word8optionType_word16optionType_word32optionType_word64optionType_floatoptionType_doubleoptionType_maybeoptionType_setoptionType_mapoptionType_listoptionType_enum simpleOption defineOption parsedOptionsparsedArgumentsparsedSubcommand parsedError parsedHelp parseOptions runCommand subcommandparseSubcommand runSubcommandstringToGhc704validFieldNamevalidShortFlag validLongFlag hasDuplicates mapEither OptionInfo optionInfoKeyoptionInfoShortFlagsoptionInfoLongFlagsoptionInfoDefaultoptionInfoUnaryoptionInfoUnaryOnlyoptionInfoDescriptionoptionInfoGroupoptionInfoLocationoptionInfoTypeNameLocationlocationPackagelocationModulelocationFilename locationLine OptionKeyOptionKeyIgnoredOptionKeyGeneratedOptionKeyHelpGroupOptionKeyHelpSummaryOptionDefinitionsTokunTokTokStatestArgvstArgsstOpts stShortKeys stLongKeys stSubcommandsstSubCmdTokens tokensList tokensArgvToken TokenUnary tokenFlagName tokensMaptokenizeloopnextItemaddArgaddOptmergeSubcommand unionKeys parseLong parseShort toShortKeys toLongKeys throwError$fMonadStateTok $fMonadTok$fApplicativeTok $fFunctorTokHelpFlag HelpGroupHelpAll HelpSummary addHelpFlags checkHelpFlaghelpForshowOptionHelp wrapWordsshowHelpSummary showHelpAll showHelpGroupshowHelpOneGroup uniqueGroupsoptionLocationbaseControl.Applicativepureghc-prim GHC.TypesBoolGHC.BaseString integer-gmpGHC.Integer.TypeIntegerIntGHC.EnumminBoundmaxBoundGHC.IntInt8Int16Int32Int64WordGHC.WordWord8Word16Word32Word64FloatDouble Data.MaybeMaybecontainers-0.5.5.1 Data.Set.BaseSet Data.Map.BaseMapGHC.ShowShowSystem.EnvironmentgetArgs System.Exit exitFailure exitSuccess parsedError_ parsedHelp_ DeDupFlag DeDupLong DeDupShort parseBool parseIntegerparseBoundedIntegraloptionTypeBoundedInt parseFloat parseMaybe showMaybe parseListparseMapsplitshowMultipleFlagValuesvalidateOptionDefs optValidFlagscheckNoDuplicateFlags eqIgnoringKey$fParsedParsedSubcommand$fParsedParsedOptions$fSimpleOptionTypeMaybe$fSimpleOptionTypeDouble$fSimpleOptionTypeFloat$fSimpleOptionTypeWord64$fSimpleOptionTypeWord32$fSimpleOptionTypeWord16$fSimpleOptionTypeWord8$fSimpleOptionTypeWord$fSimpleOptionTypeInt64$fSimpleOptionTypeInt32$fSimpleOptionTypeInt16$fSimpleOptionTypeInt8$fSimpleOptionTypeInt$fSimpleOptionTypeInteger$fSimpleOptionType[]$fSimpleOptionTypeBool$fApplicativeDefineOptions$fFunctorDefineOptions