reads package:rebase
equivalent to
readsPrec with a precedence of 0.
A parser for a type
a, represented as a function that takes a
String and returns a list of possible parses as
(a,String) pairs.
Note that this kind of backtracking parser is very inefficient;
reading a large structure may be quite slow (cf
ReadP).
Read the value of an
STRef
Parse a time value given a format string. See
parseTimeM for
details.
Reads a
signed Real value, given a reader for an
unsigned value.
readsBinary1 n c n' matches the name of a binary data
constructor and then parses its arguments using
readsPrec1.
readsBinaryWith rp1 rp2 n c n' matches the name of a
binary data constructor and then parses its arguments using
rp1 and
rp2 respectively.
readsData p d is a parser for datatypes where each
alternative begins with a data constructor. It parses the constructor
and passes it to
p. Parsers for various constructors can be
constructed with
readsUnary,
readsUnary1 and
readsBinary1, and combined with
mappend from the
Monoid class.
attempts to parse a value from the front of the string, returning a
list of (parsed value, remaining string) pairs. If there is no
successful parse, the returned list is empty.
Derived instances of
Read and
Show satisfy the
following:
That is,
readsPrec parses the string produced by
showsPrec, and delivers the value that
showsPrec started
with.
Lift the standard
readsPrec function through the type
constructor.
readsUnary n c n' matches the name of a unary data
constructor and then parses its argument using
readsPrec.
readsUnary1 n c n' matches the name of a unary data
constructor and then parses its argument using
readsPrec1.
readsUnaryWith rp n c n' matches the name of a unary
data constructor and then parses its argument using
rp.
The current status of a thread
List the Haskell threads of the current process.
Query the current execution status of a thread.
Returns an STM action that can be used to wait for data to read from a
file descriptor. The second returned value is an IO action that can be
used to deregister interest in the file descriptor.