!*      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe&'BSafe ,=>?@AHVX_Safe2=? lambda-options Convenience  creation class.lambda-optionsAn option keyword, such as "--help"lambda-options[All the aliases for this keyword. If no names are supplied, this keyword is alway matched.lambda-optionsCText to describe the arguments to the option given by this keyword.lambda-optionsBText to describe the function of the option given by this keyword.lambda-optionsShorthand for .lambda-options Sets the 1 field in the keyword. Intended to be used infix: =kw "--directory" `argText` "DIR" `text` "Write files to DIR." lambda-options Sets the 1 field in the keyword. Intended to be used infix. /kw "--quiet" `text` "Suppress message display." lambda-optionsUsed to create an empty  with no aliases. lambda-optionsUsed to create a  with many (or no) aliases lambda-optionsUsed to create a  with a single alias.lambda-optionsIdentiy mapping.   Safe_alambda-options"User configuration for formatting.lambda-options6Formats the given string with the given configuration.lambda-options8Formats the given keywords with the given configuration.lambda-options !FormatConfig { fmtMaxWidth = 80 }Safe=>?X_IHlambda-options1Class describing parseable values. Much like the  class.lambda-optionsGiven a sequence of strings,  returns W and the number of strings (not characters) consumed if the parse failed. Otherwise,  returns 6 the parsed value and the number of strings consumed.cElement-wise, an entire string must be parsed in the sequence to be considered a successful parse.lambda-options?Turns a parser of a single string into a parser suitable for a  instance.Useful for implementing a  for a type with a  instance by supplying  to this function.Note: The string is not@ tokenized in any way before being passed into the input parser. lambda-optionsDeprecated: Use  instead.!lambda-options?Turns a parser of a single string into a parser suitable for a  instance.Useful for implementing a  for a type with a  instance by supplying  to this function.Note: The string is not@ tokenized in any way before being passed into the input parser."lambda-optionsRepeatedly applies 5 the given number of times, accumulating the results.$Useful for implementing new parsers.Example: data Point = Point Float Float Float instance Parseable Point where parse args = case repeatedParse 3 args of (Just [x,y,z], n) -> (Just (Point x y z), n)` (Nothing, n) -> (Nothing, n)#lambda-options!Parses three values sequentially.$lambda-optionsParses two values sequentially.%lambda-options-Always succeeds and never consumes any input.&lambda-options Parses a % by matching its corresponding shown .Ex: parse ["0"] == (Just (Proxy :: SomeNat (Proxy 0)), 1) parse ["13"] == (Just (Proxy :: SomeNat (Proxy 13)), 1) parse ["00"] == Nothing parse ["0xFF"] == Nothing'lambda-optionsOpaque identity parser for .Ex: parse [""] == (Just (SomeSymbol (Proxy :: Proxy "")), 1) parse ["foo"] == (Just (SomeSymbol (Proxy :: Proxy "foo")), 1) parse [] == (Nothing, 0)(lambda-options!Parses the exact string given by .Ex: parse [""] == (Just (Proxy :: Proxy ""), 1) parse ["foo"] == (Just (Proxy :: Proxy "foo"), 1) parse ["foo"] == (Nothing :: Maybe (Proxy :: "bar"), 0) parse [] == (Nothing, 0))lambda-options Parses a % by matching its corresponding shown .Ex: parse ["0"] == (Just (Proxy :: Proxy 0), 1) parse ["13"] == (Just (Proxy :: Proxy 13), 1) parse ["00"] == Nothing parse ["0xFF"] == Nothing*lambda-options/Parses an 'Either a b'. This attempts to parse Left a before attempting to parse Right b+lambda-options>Greedily parses a single argument or no argument. Never fails.,lambda-options Parses an  using its  instance.-lambda-options Parses a  using its  instance..lambda-optionsIdentity parser. Tparse [""] == (Just "", 1) parse ["foo"] == (Just "foo", 1) parse [] == (Nothing, 0)/lambda-options!Parses a single character string.0lambda-options Parses an  using its  instance.1lambda-options Parses an  using its  instance.2lambda-options Parses a  using its  instance. !"!" Safe ,=>?@AHVXJSafe,2>@AX_r 3lambda-optionsPContains information about what went wrong during an unsuccessful options parse.9lambda-optionsA context for parsing options.:lambda-optionsA monad for parsing options.;lambda-optionsDescribes the callback f/ to be called for a successfully parsed option.The function (or value) f> can have any arity and ultimately returns a value with type r2Each of the callback's arguments must have a type t which implements  and .2Think of this as the following constraint synonym: [type OptionCallback r f = (f ~ ((Parseable t*, Typeable t*) => t0 -> t1 -> ... -> tN -> r))Example callbacks: %f0 = putStrLn "Option parsed!" :: IO () f1 = put :: String -> State String () f2 = liftIO . print :: (MonadIO m) => Int -> m () f3 name year ratio = lift (print (name, year, ratio)) :: (MonadTrans m) => String -> Int -> Float -> m IO () f4 = 7 :: Int f5 = (:) :: Double -> [Double] -> [Double]<lambda-optionsPretty prints an 3.=lambda-options|Tries to parse the supplied options against input arguments. If successful, parsed option callback results are returned in  . Otherwise 3 is returned in .Example program: import qualified System.Environment as Env import qualified Text.LambdaOptions as L options :: L.Options (IO ()) options = do L.addOption (L.kw ["--help", "-h"] `L.text` "Display this help text.") $ do putStrLn "Usage:" putStrLn $ L.getHelpDescription options L.addOption (L.kw "--add" `L.argText` "X Y" `L.text` "Adds two Doubles and prints their sum.") $ \x y -> do print $ x + (y :: Double) main :: IO () main = do args <- Env.getArgs case L.runOptions options args of Left e -> do putStrLn $ L.prettyOptionsError e putStrLn $ L.getHelpDescription options Right results -> do sequence_ results:main --add 3 0.143.14:main -hUsage:C --add X Y Adds two Doubles and prints their sum.4 -h, --help Display this help text.:main --add 0 1 --add 2 four(Bad input for `--add' at index 3: `four'C --add X Y Adds two Doubles and prints their sum.4 -h, --help Display this help text.>lambda-options Adds the supplied option to the  Options r context.If the keyword is matched and the types of the callback's parameters can successfully be parsed, the callback is called with the parsed arguments.?lambda-options9Produces the help description given by the input options.@lambda-options Produces the "s inserted into the input options.3456789:;<=>?@=9:345678<;>?@Safe ./2=?HX_k3Flambda-optionsParsers for the various W type constructors.Hlambda-optionsParsers for the various \ type constructors.Jlambda-optionsParsers for the various _ type constructors.Llambda-optionsTurns a type-level Q into a value-level one.Nlambda-optionsData type used for parsing  values with various schemes.0It can be useful to make an alias for this type: type B = Booly 'AllowWord 'DisallowLetter 'DisallowNumber 'LowerAll pattern B :: Bool -> B pattern B x = Booly x b :: B -> Bool b = unBoolyQlambda-optionsControls required casing for N.Rlambda-optionsCasing is completely ignored.Slambda-options Either casing satisfies a parse.Tlambda-optionsFully lowercase is required.Ulambda-optionsFully uppercase is required.Vlambda-options?The first letter must be uppercase. The rest must be lowercase.Wlambda-options#Controls number representation for N.Xlambda-options Disallow number representations.Ylambda-optionsAllow 0 and 1 number representations.Zlambda-optionsAllow N >= 0 integer representations. 0 maps to . N > 0 maps to .[lambda-options Allow any N integer representation. 0 maps to . N /= 0 maps to .\lambda-options#Controls letter representation for N.]lambda-options Disallow "t" and "f" letter representations.^lambda-optionsAllow "t" and "f" letter representations._lambda-options!Controls word representation for N.`lambda-options Disallow "true" and "false" word representations.alambda-optionsAllow "true" and "false" word representations.blambda-optionsReads a N from a .llambda-options Parses a N using b.FGHIJKLMNOPQRSTUVWXYZ[\]^_`abNOP_`a\]^WXYZ[QRSTUVJKHIFGLMbSafe2Nvlambda-optionsA simple wrapper over [a]+. Used to avoid overlapping instances for  Parseable [a] and Parseable String.ylambda-options1Greedily parses arguments item-wise. Never fails. Example: 3parse (words "5 67 NaN") == (Just (List [5,67]), 2)vwxvwxSafeD  !"3456789:;<=>?@FGHIJKLMNOPQRSTUVWXYZ[\]^_`abvwxSafe.Xlambda-options#Try with these succeeding examples: o:main help :main help clone :main clone some-repo :main clone some-repo some-dir :main clone --binary some-repoSafelambda-options#Try with these succeeding examples: <:main >> help >> product 11 5 7.12 >> sum -1.23 1.23 >> quit Safe.glambda-options#Try with these succeeding examples: \:main --and true false :main --and TRUE FALSE :main --and 1 0 :main --and true 0 --or 1 TRUE%Also try with these failing examples: G:main --and true :main --and t f :main --and 0 2 :main --and True False Safe\lambda-options#Try with these succeeding examples: :main --foo 1 abc :main --bar :main --bar 4 5 6 :main --baz :main --foo 1 abc --bar 4 5 6 --baz :main --baz --bar 4 5 6 --foo 1 abc%Also try with these failing examples: 5:main --foo abc :main --foo 1.5 abc :main --bar a b c Safelambda-options#Try with these succeeding examples: :main --foo 1 abc :main --bar :main --bar 4 5 6 :main --baz :main --foo 1 abc --bar 4 5 6 --baz :main --baz --bar 4 5 6 --foo 1 abc%Also try with these failing examples: 5:main --foo abc :main --foo 1.5 abc :main --bar a b c Safelambda-options#Try with these succeeding examples: J:main --help :main --add 1 2 :main --add 3 4 --add 5 6 :main --add -1 3.14%Also try with these failing examples: U:main --add 0 :main --add 1 2 3 :main --add 123 :main --add True 0 :main --add 0 True !"#$%&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`aabcdefghijklmnopqrstuvwxyz{|}~   -lambda-options-1.1.0.0-48PCkkpdRilJtHlxNzibYzText.LambdaOptions.KeywordText.LambdaOptions.FormatterText.LambdaOptions.ParseableText.LambdaOptions.Core"Text.LambdaOptions.Parseable.Booly!Text.LambdaOptions.Parseable.List/Text.LambdaOptions.Example.Example_6_SubOptions)Text.LambdaOptions.Example.Example_5_Repl*Text.LambdaOptions.Example.Example_4_Booly+Text.LambdaOptions.Example.Example_3_Record1Text.LambdaOptions.Example.Example_2_Constructors+Text.LambdaOptions.Example.Example_1_Simple"Text.LambdaOptions.Internal.Opaque Text.LambdaOptions.Internal.Wrap GHC.TypeLits SymbolVal(Text.LambdaOptions.Internal.OpaqueParser Parseable Data.TypeableTypeableText.LambdaOptions ToKeyword toKeywordKeywordkwNames kwArgTextkwTextkwargTexttext$fIsStringKeyword $fToKeyword() $fToKeyword[]$fToKeyword[]0$fToKeywordKeyword $fDataKeyword $fShowKeyword $fEqKeyword $fOrdKeyword FormatConfig fmtMaxWidthformatformatKeywordsdefaultFormatConfig$fShowFormatConfig$fReadFormatConfig$fEqFormatConfig$fOrdFormatConfigparse maybeParse simpleParse boundedParse repeatedParse$fParseable(,,)$fParseable(,) $fParseable()$fParseableSomeNat$fParseableSomeSymbol$fParseableProxy$fParseableProxy0$fParseableEither$fParseableMaybe$fParseableDouble$fParseableFloat $fParseable[]$fParseableChar$fParseableInteger$fParseableInt$fParseableWord OptionsError ParseFailedparseFailedMessageparseFailedArgsparseFailedBeginArgsIndexparseFailedEndArgsIndexOptionsOptionsMOptionCallbackprettyOptionsError runOptions addOptiongetHelpDescription getKeywords $fMonadStateOptionsStateOptionsM$fMonadOptionsM$fApplicativeOptionsM$fFunctorOptionsM$fShowOptionsErrorReadBoolNumberreadBoolNumberReadBoolLetterreadBoolLetter ReadBoolWord readBoolWord BoolCasingVal boolCasingValBoolyunBooly BoolCasing IgnoreCaseOrCasingLowerAllUpperAll UpperHead BoolNumberDisallowNumberAllowBit AllowNatural AllowInteger BoolLetterDisallowLetter AllowLetterBoolWord DisallowWord AllowWord readBooly$fBoolCasingValUpperHead$fBoolCasingValUpperAll$fBoolCasingValLowerAll$fBoolCasingValIgnoreCase$fBoolCasingValOrCasing$fReadBoolWordAllowWord$fReadBoolWordDisallowWord$fReadBoolLetterAllowLetter$fReadBoolLetterDisallowLetter$fParseableBooly$fReadBoolNumberAllowInteger$fReadBoolNumberAllowNatural$fReadBoolNumberAllowBit$fReadBoolNumberDisallowNumber $fDataBooly $fShowBooly $fReadBooly $fEqBooly $fOrdBoolyListunList$fParseableList $fDataList $fShowList $fReadList$fEqList $fOrdListmain$fShowSourceControlOption $fShowOptions $fShowOptionOpaqueCallbackOpaqueWrapwrapbaseGHC.ReadRead GHC.MaybeNothingJust Text.Read readMaybe+read-bounded-0.1.1.2-IvQxIbgE8wlINi6FkiMdakText.Read.Bounded ReadBounded readBounded GHC.TypeNatsSomeNatnatVal symbolValKnownNatghc-prim GHC.TypesDoubleFloat integer-gmpGHC.Integer.TypeIntegerIntWordGetOpaqueParsers OpaqueParsergetOpaqueParsers Data.EitherRightLeftBoolFalseTrueGHC.BaseString