ReadP -package:base

Parse JSON values using the ReadP combinators.
This is a library of parser combinators, originally written by Koen Claessen. It parses all alternatives in parallel, so it never keeps hold of the beginning of the input string, a common source of space leaks with other parsers. The (+++) choice combinator is genuinely commutative; it makes no difference which branch is "shorter".
This is a library of parser combinators, originally written by Koen Claessen. It parses all alternatives in parallel, so it never keeps hold of the beginning of the input string, a common source of space leaks with other parsers. The (+++) choice combinator is genuinely commutative; it makes no difference which branch is "shorter". See also Koen's paper Parallel Parsing Processes (http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.9217). This version of ReadP has been locally hacked to make it H98, by Martin Sjögren mailto:msjogren@gmail.com The unit tests have been moved to UnitTest.Distribution.Deprecated.ReadP, by Mark Lentczner mailto:mark@glyphic.com
A read-based parser for the parser modifier.
This library defines parser combinators for precedence parsing.
Parsing the SVG path command, see http://www.w3.org/TR/SVG/paths.html#PathData :
Parse a time value given a format string. See parseTimeM for details.
readProcess forks an external process, reads its standard output strictly, blocking until the process terminates, and returns the output string. The external process inherits the standard error. If an asynchronous exception is thrown to the thread executing readProcess, the forked process will be terminated and readProcess will wait (block) until the process has been terminated. Output is returned strictly, so this is not suitable for launching processes that require interaction over the standard file streams. This function throws an IOError if the process ExitCode is anything other than ExitSuccess. If instead you want to get the ExitCode then use readProcessWithExitCode. Users of this function should compile with -threaded if they want other Haskell threads to keep running while waiting on the result of readProcess.
> readProcess "date" [] []
"Thu Feb  7 10:03:39 PST 2008\n"
The arguments are:
  • The command to run, which must be in the $PATH, or an absolute or relative path
  • A list of separate command line arguments to the program. See RawCommand for further discussion of Windows semantics.
  • A string to pass on standard input to the forked process.
readProcessWithExitCode is like readProcess but with two differences:
  • it returns the ExitCode of the process, and does not throw any exception if the code is not ExitSuccess.
  • it reads and returns the output from process' standard error handle, rather than the process inheriting the standard error handle.
On Unix systems, see waitForProcess for the meaning of exit codes when the process died as the result of a signal.
Read a positive Int, accounting for overflow
Read a value from the array at the given index. Note: this function does not do bounds checking.