reads package:ghc-internal
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 a
StablePtr# value from mutable array; offset in machine
words.
Warning: this can fail with an unchecked exception.
Read a
StablePtr# value from mutable address; offset in machine
words.
On some platforms, the access may fail for an insufficiently aligned
Addr#.
Warning: this can fail with an unchecked exception.
Read the value of an
STRef
Reads a
signed Real value, given a reader for an
unsigned value.
Read parser for a symbol record field, of the form
(###)=value (where
### is the field name). The field
name must be a symbol (operator-style), e.g.
(#). For regular
(alphanumeric) field names, use
readField. The second argument
is a parser for the field value.
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.
Converts a Haskell ReadS-style function into a parser. Warning: This
introduces local backtracking in the resulting parser, and therefore a
possible inefficiency.
Returns an array of the threads started by the program. Note that this
threads which have finished execution may or may not be present in
this list, depending upon whether they have been collected by the
garbage collector.
Get the status of the given thread. Result is (ThreadStatus,
Capability, Locked) where ThreadStatus is one of the
status constants defined in rts/Constants.h,
Capability is the number of the capability which currently
owns the thread, and Locked is a boolean indicating whether
the thread is bound to that capability.
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.
The current status of a thread
List the Haskell threads of the current process.
Query the current execution status of a thread.
Clone the stack of a thread identified by its
ThreadId
Number of threads used in this GC