Hoogle Search

Within LTS Haskell 24.31 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. readIOPort :: IOPort a -> IO a

    base GHC.IOPort

    Atomically read the contents of the IOPort. If the IOPort is currently empty, readIOPort will wait until it is full. After a readIOPort, the IOPort is left empty. There is one important property of readIOPort:

    • Only a single threads can be blocked on an IOPort.

  2. readIORef :: IORef a -> IO a

    base GHC.IORef

    Read the value of an IORef. Beware that the CPU executing a thread can reorder reads or writes to independent locations. See Data.IORef#memmodel for more details.

  3. readMVar :: MVar a -> IO a

    base GHC.MVar

    Atomically read the contents of an MVar. If the MVar is currently empty, readMVar will wait until it is full. readMVar is guaranteed to receive the next putMVar. readMVar is multiple-wakeup, so when multiple readers are blocked on an MVar, all of them are woken up at the same time. The runtime guarantees that all woken threads complete their readMVar operation. Compatibility note: Prior to base 4.7, readMVar was a combination of takeMVar and putMVar. This mean that in the presence of other threads attempting to putMVar, readMVar could block. Furthermore, readMVar would not receive the next putMVar if there was already a pending thread blocked on takeMVar. The old behavior can be recovered by implementing 'readMVar as follows:

    readMVar :: MVar a -> IO a
    readMVar m =
    mask_ $ do
    a <- takeMVar m
    putMVar m a
    return a
    

  4. readField :: String -> ReadPrec a -> ReadPrec a

    base GHC.Read

    Read parser for a record field, of the form fieldName=value. The fieldName must be an alphanumeric identifier; for symbols (operator-style) field names, e.g. (#), use readSymField). The second argument is a parser for the field value.

  5. readFieldHash :: String -> ReadPrec a -> ReadPrec a

    base GHC.Read

    Read parser for a record field, of the form fieldName#=value. That is, an alphanumeric identifier fieldName followed by the symbol #. The second argument is a parser for the field value. Note that readField does not suffice for this purpose due to #5041.

  6. readList :: Read a => ReadS [a]

    base GHC.Read

    The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String are expected to use double quotes, rather than square brackets.

  7. readListDefault :: Read a => ReadS [a]

    base GHC.Read

    A possible replacement definition for the readList method (GHC only). This is only needed for GHC, and even then only for Read instances where readListPrec isn't defined as readListPrecDefault.

  8. readListPrec :: Read a => ReadPrec [a]

    base GHC.Read

    Proposed replacement for readList using new-style parsers (GHC only). The default definition uses readList. Instances that define readPrec should also define readListPrec as readListPrecDefault.

  9. readListPrecDefault :: Read a => ReadPrec [a]

    base GHC.Read

    A possible replacement definition for the readListPrec method, defined using readPrec (GHC only).

  10. readLitChar :: ReadS Char

    base GHC.Read

    Read a string representation of a character, using Haskell source-language escape conventions, and convert it to the character that it encodes. For example:

    readLitChar "\\nHello"  =  [('\n', "Hello")]
    

Page 64 of many | Previous | Next