úÎübóß‹      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰ŠSafe7Extracts 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.Safe+;N#5Indicates that some string was not able to be parsed. )A REPL command, possibly with parameters. 2The short name of the command. Purely informative. YReturns whether the first part of an input (the command name) matches a the command. defCommandTest is appropriate for most cases.A description of the command.TRuns the command with the input text as parameter, returning the unconsumed input.jToo few parameters were given to a command. The first value is the minium, the second the actual number.lToo many parameters were given to a command. The first value is the maximum, the second the actual number.•The input of a command was malformed and could not interpreted. I.e. the input contained inadmissible characters, or quotes were mismatched. The Text$ argument contains the parser error.+Generic error related to command execution.DIndicatres that the last existing portion of a path is not writable.(Indicates that no part of a path exists.CIndicates whether the target of a path exists and what form it has. ŽA verbatim Text whose Read instance simply returns the read string, as-is. This is useful for askers which ask for strings without quotes.#0A generic predicate failure for use with Askers.%+A generic type failure for use with Askers.'/The input for an Asker was aborted by the user.)$The parsed value failed a predicate.+#The input wasn't able to be parsed.-Generic error related to 2Xs. Either the input was incorrect in some way, or the process was aborted by the user./ Root of the exception hierarchy.1OAn Asker which does not convert its argument into different type after parsing.2gThe description of an 'ask for user input'-action. The type parameters are the used monad (typically ‹ or ExceptT_), the type of the read value and the type of the error that is thrown in case of failures.mThe components are a prompt, a parser, and a predicate that the parsed value must fulfil. The the predicateis monadic andJcan change the returned type (useful for adjoining additional information)4'The prompt to be displayed to the user.5The parser for the input value.6\The predicate which the input, once read, must fulfill. The Left side is an error message.7AA parser which either returns a parsed value or an error message.88A predicate which does not change the type of its input.9(A predicate which a value has to fulfil.: A prompt.;=An error message indicating that a value failied a predicate.<BAn error message indicating that a value wasn't able to be parsed.AConstructor for % which wraps the value into a Œ.BConstructor for % which wraps the value into a Œ.PRead-instance for  7. Wraps the given value into quotes and reads it a a .R  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY=  !"#$%&'()*+,-./0123456789:;<=>?@ABCDR<;:987234561/0YX=>-.WV?@+,U)*T'(S%&RA#$QB !"PONMLCDKJI HGF E6   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYNone4NZPrints a string to stderr.[<Prints a string, followed by a newline character, to stderr.\Prints > # and asks the user to input a line.]QPrints its first argument and, in the same line, asks the user to input a line.^SThe same as prompt, but aborts as soon as the user presses a given key (commonly '\ESC'R). This function temporarily tries to set the buffering mode to NoBuffering via 9, which may not be supported. See the documentation of  for details.Z[\]^Ž‘’“”•–—˜™š›œZ[\]^Z[\]^Z[\]^None+N Creates a NoParseError out of a ž._ Variant of a that uses Ÿ and   for (de)serialization.+If the file's content's can't be parsed, a  NoParseError will be thrown.` Variant of a& that uses JSON for (de)serialization.+If the file's content's can't be parsed, a  NoParseError will be thrown.a Tries to read a configuration from file. If the file is missing, a default instance is written to file and returned. The following exceptions may be thrown: IOException_, if the IO operations associated with reading or creating the configuration file fail, andAn exception of type eL if the configuration file is present, but its contents can't be parsed._`aPath of the configuration file.Parser for the file's contents.ŠEncoder for the default value. If the given configuration file does not exist, a default value will be serialized using this function. _`aa`_ _`aNoneFNUb Creates an 2. which only cares about the type of the input.cYAn asker which asks for an optional value. If only whitespace is entered (according to ¡), it returns ¢O without further parsing or checking; otherwise, it behaves identically to e.dA parser based on £5. This suffices for the parsing of most data types.eCreates a general 2 with £ as its parser. Using  “ is perfectly fine for most values, keep in mind that the input Text has to be unpacked into a string. This can be costly on very large inputs.NOTE:à Instances of String/Text have to be surrounded with quotes ("). You practically never want this when asking for input. If you want to get the user input as-is, restrict the return type to Asker m Verbatim or use 'predAsker'/'lineAsker'.f Creates an 2< based on Read which just cares about the type of the input.g Creates an 2# which takes its input verbatim as Textm. Quotes around the input are not required. The input thus only has to pass a predicate, not any parsing.hA wrapper aroung •4. Prints no prompt and returns the user input as-is.i8An asker based on Read which asks for an optional value.jExecutes an Asker. A -e is thrown if the inpout can't be parsing into a value of the correct type, if the input fails the 1/s predicate, or if the escape key is pressed.kSee j$. Always reads the input from stdin. ask' a = ask a Nothing l Executes an 2Z. 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."Pressing the escape key returns a AskerInputAborterError (if supported).mnRepeatedly executes an ask action until the user enters a valid value. Error messages are printed each time.nACreates a predicate from a boolean function and an error message.o(Asks the user for a file or a directory.&Parsing checks for basic validity via  . Invalid paths are rejected.After that, the asker determines whether the target exists and what type it has. You can run a predicate on that information.pSee o. This 2H also ensures that the given path is writeable in the following sense:1at least some initial part of the path exists and0the last existing part of the path is writeable. and P exceptions are thrown if the first or second of these conditions is violated.IFor relative paths, we only check that the current directory is writable.Handled exceptions:  bcdefghijklmnop0 !"#$%&)*+,-./0123456789:;<ABbcdefghijklmnop0:<;987234561/0-.+,)*%&#$ABbc !"dehfgijklmnopbcdefghijklmnopNonequRuns the command with the input text as parameter, discarding any left-over input. The command test is disregarded. Can throw:rURuns the command with the input text as parameter. The command test is disregarded. Can throw:", if any input is left unconsumed.Note: ¾ will only be thrown after the command's execution is attempted. This is because of the subcommand mechanism, which prevents the static determination of the number of required arguments.saRuns the command with the input text as parameter. If the input doesn't pass the command test, Nothing is returned. Can throw:", if any input is left unconsumed.t Takes a list xs2 and executes the first command in a list whose   matches the input. Note that the resultant command cs ) should only be executed with an input t& if 'commandTest c t' == True', where t' is either head (readArgs t) or mempty if t0 is empty. Otherwise, the result is undefined.u“Adds a list of possible subcommands after a command (that should leave some input unconsumed). Ignoring all the required parameters for a moment,  subcommand x xs = x >>- oneOf xsvLSplits and trims the input of a command. If the input cannot be parsed, a  exception is thrown.Formatÿ 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).$Arguments are parsed using parsec's  stringLiteralc (haskell-style), meaning that escape sequences and unicode characters are handled automatically.wXGets the first part of a command string. Returns Nothing if the string is empty of if v throws a .xEThe "default" command test for making commands. This function uses w to extract the first part of the user input, stripping whitespace and also checking whether the entire input is well-formed.ygSurrounds an argument in quote marks, if necessary. This is useful when arguments were extracted via vk, which deletes quote marks. Quotes are placed around the input iff it is empty or contains whitespace.z%Creates a command without parameters.{%Creates a command with one parameter.|&Creates a command with two parameters.}(Creates a command with three parameters.~'Creates a command with four parameters.'Creates a command with five parameters.€&Creates a command with six parameters.(Creates a command with seven parameters.‚(Creates a command with eight parameters.ƒ>Creates a command with a list of parameters. The first list necc of 2bs indicates the necessary parameters; the user must at least provide this many. The second list opt contains 2ks for additional, optional parameters, and may be infinite. If the number of passed parameters exceeds length necc + length opt , or if any 2! fails, the command returns an  AskFailure.„<Prints out a list of command names, with their descriptions.¤ Throws a ? if the length of the list is smaller than the second argument.¥ Wrapper for j.…iRuns a REPL based on a set of commands. For a line of input, the commands are tried in following order:the "exit" command,all regular commands, and thenthe "unknown" command.† A variant of … with some default settings:The "exit" command is ˆ./The "unknown" command prints "Unknown command:  userinput".The prompt is "> ".The error handler is Š.‡3A command that takes no arguments and does nothing.ˆfA command with the name ":exit" and the description "Exits the program." Otherwise, it does nothing.)You can use this as the exit-command for …3, if no special clean-up is needed upon quitting.‰SA help-command with the name ":help" and the description "Prints this help text."]It goes through the given list of commands and prints the name and description of each one.Š%A default error handler that catches / and prints it to stdout.Useful in combination with ….¦qrst Command name.Command description.uThe root command.=The subcommands that may follow it. This list must be finite.vwx-Command names, including permissible aliases. User input.yz Command name. Command test.Command description.Command function. It will receive the first part of the input (customarily the command name), or the empty string if the input only contained whitespace.{ Command name. Command test.Command description•Whether the command can ask for input. If True, running the command will run the Asker's IO action if not enough input is provided. If False a  will be thrown.2 for the first parameter.Command function.| Command name. Command test.Command description&Whether the command can ask for input.2 for the first parameter.2 for the second parameter.Command function.} Command name. Command test.Command description&Whether the command can ask for input.2 for the first parameter.2 for the second parameter.2 for the third parameter.Command function.~  Command name. Command test.Command description&Whether the command can ask for input.2 for the first parameter.2 for the second parameter.2 for the third parameter.2 for the fourth parameter.Command function.  Command name. Command test.Command description&Whether the command can ask for input.2 for the first parameter.2 for the second parameter.2 for the third parameter.2 for the fourth parameter.2 for the fifth parameter. Command function.€  Command name. Command test.Command description&Whether the command can ask for input.2 for the first parameter.2 for the second parameter.2 for the third parameter.2 for the fourth parameter.2 for the fifth parameter. 2 for the sixth parameter. Command function.  Command name. Command test.Command description&Whether the command can ask for input.2 for the first parameter.2 for the second parameter.2 for the third parameter.2 for the fourth parameter.2 for the fifth parameter. 2 for the sixth parameter. 2 for the seventh parameter. Command function.‚  Command name. Command test.Command description&Whether the command can ask for input.2 for the first parameter.2 for the second parameter.2 for the third parameter.2 for the fourth parameter.2 for the fifth parameter. 2 for the sixth parameter. 2 for the seventh parameter. 2 for the eighth parameter. Command function.ƒ Command name. Command test.Command descriptionTWhether the command can ask for input. This only affects the necessary parameters.2s for the necessary parameters.2s for the optional parameters.„¤¥…The regular commands.-The "exit" command which terminates the loop.GThe command that is called when none of the others match. This one's   is replaced with  const True.;The asker to execute before each command (i.e. the prompt).YList of Handlers for any exceptions that may arise. The exception hierchy is rooted in /. See System.REPL.Types.eAsks the user repeatedly for input, until the input matches the command test of the "exit" command.†‡ Command name.jAlternative names for the command. The user can either the command name or any of the alternative names.1E.g. "exit" with alternative names ":e", ":quit".ˆ‰Š* /0qrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š* tuqrs…†/0vwxy„z{|}~€‚ƒ‡ˆ‰Š¦qrstuvwxyz{|}~€‚ƒ„¤¥…†‡ˆ‰ŠNone]  !"#$%&)*+,-./0123456789:;<AB_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š§  !!""##$$%&'())*++,,--..//0011233456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–”•—”•˜”•™”•𔕛”•œ”•”•ž”•Ÿ”• ”•¡”•¢”•£”•¤¥Ž¦§Ž¨©Žª«Ž¬­Ž®¯Ž° ±²³´replt_LKZUMtgI4mo7PElfybxmfqSystem.REPL.StateSystem.REPL.TypesSystem.REPL.PromptSystem.REPL.ConfigSystem.REPL.AskSystem.REPL.Command System.IO hSetBuffering Data.Read readMaybeSystem.FilePathisValidSystem.IO.ErrorisPermissionErrorisDoesNotExistError System.REPLget1get2get3get4get5get6get7get8NoConfigFileParseErrorCommand commandName commandTest commandDescrunPartialCommandTooFewParamsErrorTooManyParamsErrorMalformedParamsErrorSomeCommandErrorPathIsNotWritablePathRootDoesNotExistPathExistenceType IsDirectoryIsFile DoesNotExistVerbatim fromVerbatimGenericPredicateErrorGenericTypeErrorAskerInputAbortedErrorAskerPredicateErrorAskerTypeErrorSomeAskerError SomeREPLErrorAsker'Asker askerPrompt askerParseraskerPredicateParser Predicate' Predicate PromptMsgPredicateError TypeErrorreplErrorUpcastreplErrorDowncastaskerErrorUpcastaskerErrorDowncastgenericTypeErrorgenericPredicateErrorcommandErrorUpcastcommandErrorDowncast!$fExceptionNoConfigFileParseError $fBindCommand$fApplyCommand$fFunctorCommand$fExceptionTooFewParamsError$fExceptionTooManyParamsError$fExceptionMalformedParamsError$fExceptionSomeCommandError$fShowSomeCommandError$fExceptionPathIsNotWritable$fExceptionPathRootDoesNotExist$fReadVerbatim $fExceptionGenericPredicateError$fExceptionGenericTypeError!$fExceptionAskerInputAbortedError$fExceptionAskerPredicateError$fExceptionAskerTypeError$fExceptionSomeAskerError$fShowSomeAskerError$fExceptionSomeREPLError$fShowSomeREPLErrorputErrputErrLnpromptprompt' promptAbortreadConfigShowreadConfigJSONreadConfigFile typeAskerP maybeAskerP readParserasker typeAsker predAsker lineAsker maybeAskeraskask' askEither untilValid boolPredicate filepathAskerwritablefilepathAsker runCommandrunSingleCommandrunSingleCommandIfoneOf subcommandreadArgsgetNamedefCommandTestquoteArg makeCommand makeCommand1 makeCommand2 makeCommand3 makeCommand4 makeCommand5 makeCommand6 makeCommand7 makeCommand8 makeCommandNsummarizeCommandsmakeREPLmakeREPLSimplenoOpCmd defExitCmd defHelpCmddefErrorHandlerghc-prim GHC.TypesIObase GHC.Exception SomeExceptiontext_1l1AN4I48k37RaQ6fm6CEhData.Text.InternalTextListL_99oftiqribp4GTCEebe2KzData.ListLike.IO appendFile writeFilereadFileinteractputStrLnputStr getContentsgetLine hPutStrLnhPutStrhGetNonBlockinghGet hGetContentshGetLine ListLikeIO noParseErrorGHC.IOFilePathGHC.ShowShowGHC.ReadRead GHC.UnicodeisSpaceGHC.BaseNothing Text.Read checkParamNumaskC++