o7      !"#$%&'()*+,-./0123456 Safe-Inferred8Extracts a result from the current state. Defined as get1 f = liftM f get. -Extracts two results from the current state. /Extracts three results from the current state. .Extracts four results from the current state. .Extracts five results from the current state. -Extracts six results from the current state. /Extracts seven results from the current state. /Extracts eight results from the current state. None+3TA verbatim Text whose Read instance simply returns the read string, as-is. This is useful for askers which ask for strings without quotes.  Extracts a  Verbatim's 7.  Represents a failure of an ask function. It can either be a type failure (failure to interpret the user input as a value of the required type) or a predicate failure (the user input could be interpreter as a value of the required type, but it failed some user-supplied test). @Indicates that no action was appropriate to the given input. @Indicates that an incorrect number of parameters was passed. 7Indiciates that the parsed value failed a predicate. ;Indicates that the parsing as the required type failed. %Singleton type representing success. hThe description of an 'ask for user input'-action. The type parameters are the used monad (typically IOb), the type of the read value and the type of the error that is thrown in case of failures. (The prompt to be displayed to the user. IThe parser for the input value, which either delivers a value of type a or an error message. NThe predicate which the input, once read, must fulfill. It either delivers  or an error message. Prints a string to stderr. =Prints a string, followed by a newline character, to stderr. Prints > $ and asks the user to input a line. SPrints its first argument and, in the same line, asks the user to input a line. Creates a general  with W as its parser. This suffices for most simple values. The main drawback of using  is that the input 7 is unpacked into a String, which incurs a performance hit. For short (one-line) input. this isn't important, but if large ones are expected, it's better to pass a custom, 7:-compatible parsing function, such as a parsec-parser.  Creates an / which just cares about the type of the input.  Creates an # which takes its input verbatim as 7. ZAn asker which asks for an optional value. If only whitespace is entered (according to 8), it returns 9Q without further parsing or checking; otherwise, it behaves identically to .  Executes an [. If the Text argument is Nothing, the user is asked to enter a line on stdin. If it is Just x, x is taken to be input. If the input is of the wrong type, an error-message is printed and the user is asked again. In addition to the condition that the input must be of the correct type, it must also fulfill a predicate. Since the predicate is of monadic, arbitrarily complex tests can be performed: checking whether an item is in a database, whether a date was less than x years ago, etc. See (. Always reads the input from stdin. ask' a = ask a Nothing. !pRepeatedly executes an ask action until the user enters a valid value. Error messages are printed each time. :Read-instance for 8. Wraps the given value into quotes and reads it a a 7.   The prompt. Type error message. Predicate error message.  Predicate.  The prompt. Type error message.  The prompt. Predicate error message. The predicate.  The prompt. Type error message. Predicate error message.  Predicate.  !:;<)=>?@ABCDEFGHIJK  !    !   !:;<None+3"*A REPL command, possibly with parameters. $3The short name of the command. Purely informative. %LReturns whether a string matches a command name. The simplest form is s==@ for some string s, but more liberal matchings are possible. &A description of the command. '$The number of parameters, if fixed. (3Runs the command with the input text as parameter. )~Prints information (the command name, description and, if given, the number of parameters) about a command to the console. *Splits and trims the input of a command. Any non-whitespace sequence of characters is interpreted as one argument, unless double quotes (") are used, in which case they demarcate an argument. Each argument is parsed as a haskell string literal (quote-less arguments have quotes inserted around them). If the number of quotes in the input is not even, the operating will fail. $Arguments are parsed using parsec's  stringLiterale (haskell-style), meaning that escape sequences and unicode characters are handled automatically. +OTakes a line of text and a command. If the text matches the given command's %), the command is run with it. If not, 9 is returned. LVReturns an error message if an unexpected number of parameters have been supplied. MChecks the number of parameters before executing a monadic function. For compatibility (with the IO monad, mainly), the nominal type of the thrown exception is Nd, but only AskFailures will actually be thrown in this function (other IO exceptions may occur). ,hSurrounds an argument in quote marks, if necessary. This is useful when arguments were extracted via *u, which deletes quote marks. Quotes are placed around the input iff it doesn't begin with a quote mark ("). * and ,i are inverse up to suitable isomorphism, i.e. if 'readArgs orig = (Right res)', then it holds that =readArgs orig = readArgs $ intercalate " " $ map quoteArg res -&Creates a command without parameters. .&Creates a command with one parameter. /'Creates a command with two parameters. 0)Creates a command with three parameters. 1(Creates a command with four parameters. 2(Creates a command with five parameters. 3(Creates a command with four parameters. 4?Creates a command with a list of parameters. The first list necc of cs indicates the necessary parameters; the user must at least provide this many. The second list opt contains ms for additional, optional parameters, and may be infinite. If the number of passed parameters exceeds length necc + length opt , or if any " fails, the command returns an  . 5vTakes an input and tries to run it against a list of commands, trying the out in sequence. The first command whose %@ returns True is executed. If none of the commands match, NothingFoundFailure is thrown. 6=Prints out a list of command names, with their descriptions. OPQR"#$%&'(S)*+LThe command name. The given input. "The minimum number of parameters. QThe maximum number of parameters. May be infinite if there is no upper bound. !The kind of error that occurred. MThe command name. ,The raw input (including the command name). @The minimal number of parameters, excluding the command's name. tThe maximal number of parameters, excluding the command's name. This may be infinity if there is no upper bound.  The command. >Result. If too many parameters were passed, this will be a ParamNumFailure. ,-Command name. Command test. Command description. The actual command. .Command name. Command test. Command description  for the first parameter. /Command name. Command test. Command description  for the first parameter.  for the second perameter. 0Command name. Command test. Command description  for the first parameter.  for the second perameter.  for the third parameter. 1Command name. Command test. Command description  for the first parameter.  for the second perameter.  for the third parameter.  for the fourth parameter. 2Command name. Command test. Command description  for the first parameter.  for the second perameter.  for the third parameter.  for the fourth parameter.  for the fifth parameter. 3 Command name. Command test. Command description  for the first parameter.  for the second perameter.  for the third parameter.  for the fourth parameter.  for the fifth parameter.  for the sixth parameter. 4Command name. Command test. Command description  s for the necessary parameters. s for the optional parameters. 5The user's input. The command library. 6T"#$%&'()*+,-./0123456"#$%&'()+56*,-./01234ORQP"#$%&'(S)*+LM,-./0123456TU      !"#$%%&'()*+,-./0123456789:;<=><?@ABCDEFDEGDEHDEIDEJDEKDELDEMDENDEODEPDEQDERDESDETUV<WXYZ[\]^_repl-toolkit-0.1.0.0System.REPL.State System.REPLSystem.REPL.Command Data.Read readMaybeget1get2get3get4get5get6get7get8Verbatim fromVerbatim AskFailureNothingFoundFailure ParamFailurePredicateFailure TypeFailureSuccessAsker askerPrompt askerParseraskerPredicateputErrputErrLnpromptprompt'asker typeAsker predAsker maybeAskeraskask' untilValidCommand commandName commandTest commandDesc numParameters runCommand commandInforeadArgsrunOncequoteArg makeCommand makeCommand1 makeCommand2 makeCommand3 makeCommand4 makeCommand5 makeCommand6 makeCommandNcommandDispatchsummarizeCommands text-1.1.1.3Data.Text.Internal.LazyTextbase GHC.UnicodeisSpace Data.MaybeNothing$fReadVerbatim$fShowAskFailure$fExceptionAskFailureListLike-4.1.0Data.ListLike.IO appendFile writeFilereadFileinteractputStrLnputStr getContentsgetLine hPutStrLnhPutStrhGetNonBlockinghGet hGetContentshGetLine ListLikeIOparamErr checkParams GHC.Exception SomeException ParamNumError TooManyParams ExactParamsNoParams++$fFunctorCommand